public static void OnDoodadDeath(SkEntity a, SkEntity b) { if (commonDeathEvent != null) { commonDeathEvent(a, b); } //--to do if (PeGameMgr.IsAdventure) { SceneDoodadLodCmpt lod = a.gameObject.GetComponent <SceneDoodadLodCmpt>(); if (lod != null && lod.Index >= 0) { PeEntity entity = a.gameObject.GetComponent <PeEntity>(); if (entity != null) { bool isSignalTower = a.GetComponentInChildren <MonsterSummoner>() != null; VArtifactTownManager.Instance.OnBuildingDeath(lod.Index, entity.Id, isSignalTower); } } } }