/// <summary> /// 同步探测器距离宝藏的位置 /// </summary> /// <param name="buf"></param> private void OnSyncDeteCtorDistance(KProtoBuf buf) { S2C_SYNC_DETECTOR_DISTANCE msg = buf as S2C_SYNC_DETECTOR_DISTANCE; TreasureHuntProxy treasureHuntProxy = GameFacade.Instance.RetrieveProxy(ProxyName.TreasureHuntProxy) as TreasureHuntProxy; treasureHuntProxy.SyncDeteCtorDistance(msg); }
public void SyncDeteCtorDistance(S2C_SYNC_DETECTOR_DISTANCE msg) { ///if (msg.is_active == 0) ///{ /// return; ///} SpacecraftEntity entity = m_GameplayProxy.GetEntityById <SpacecraftEntity>((uint)msg.hero_uid); if (entity) { ChangeMaterialComponent motionComponent = entity.GetEntityComponent <ChangeMaterialComponent>(); if (motionComponent == null) { return; } motionComponent.ChangeEffect(msg.distance, msg.treasure_signal_tid, msg.is_active != 0); } }