void Start() { if (!(this is EntityMonsterBeacon4Kill)) { s_Beacons.Add(this); } if (!PeGameMgr.IsMulti && !IsMonsterKill) { m_Mark = new PeMap.MonsterBeaconMark(); m_Mark.Position = _position; m_Mark.IsMonsterSiege = true; PeMap.LabelMgr.Instance.Add(m_Mark); } }
void OnDestroy() { if (_airborne != null) { MonsterAirborne.DestroyAirborne(_airborne, false); } #if DestroyLeftMonster if (!isSweep) { for (int i = 0; i < _agents.Count; i++) { MonEscape(_agents [i] as SceneEntityPosAgent, transform.position); } } #endif SceneMan.RemoveSceneObjs(_agents); _agents.Clear(); if (UITowerInfo.Instance != null && _uiData != null) { UITowerInfo.Instance.Hide(); } s_Beacons.Remove(this); if (!PeGameMgr.IsMulti && null != m_Mark) { PeMap.LabelMgr.Instance.Remove(m_Mark); m_Mark = null; } if (null != CSMain.Instance) { List <CSAssembly> assemblyList = CSMain.Instance.GetAllAssemblies(); if (0 < assemblyList.Count) { for (int i = 0; i < assemblyList.Count; ++i) { CSAssembly assembly = assemblyList[i]; if (null != assembly && assembly.InRange(_position)) { DigTerrainManager.ClearColonyBlockInfo(assembly); } } } } }
protected override void OnPEStart() { base.OnPEStart(); BindAction(EPacketType.PT_InGame_TDStartInfo, RPC_S2C_TDStartInfo); BindAction(EPacketType.PT_InGame_TDInitData, RPC_S2C_ResponseInitData); BindAction(EPacketType.PT_InGame_TDInfo, RPC_S2C_TDInfo); BindAction(EPacketType.PT_InGame_TDMonsterDeath, RPC_S2C_MonsterDeath); if (IsAuth()) { m_Mark = new PeMap.MonsterBeaconMark(); m_Mark.Position = GetAuthPos(); PeMap.LabelMgr.Instance.Add(m_Mark); } }
public bool CompareTo(ILabel label) { MonsterBeaconMark mark = label as MonsterBeaconMark; return(null != mark && mark.Position == Position); }