private void onDragon_Born(ActorRoot actor) { DragonNode node = this.getDragonNode(actor.ObjID, actor.ActorControl.GetActorSubSoliderType()); DebugHelper.Assert(node != null, "onDragon_Born node == null, check out..."); if (node != null) { node.SetData(actor.gameObject.transform.position, actor.ActorControl.GetActorSubSoliderType(), actor.ObjID, this.m_b5v5); node.ShowDead(actor.ActorControl.IsDeadState); switch (actor.ActorControl.GetActorSubSoliderType()) { case 8: case 9: case 13: { bool flag = Singleton <CBattleSystem> .instance.GetMinimapSys().CurMapType() == MinimapSys.EMapType.Mini; if (flag) { TowerHit._play_effect("Prefab_Skill_Effects/tongyong_effects/Indicator/blin_01_c.prefab", 3f, !flag ? node.node_in_bigMap : node.node_in_smallMap); } Singleton <CSoundManager> .GetInstance().PlayBattleSound("Play_BaoJun_VO_Anger", null); MiniMapSysUT.RefreshMapPointerBig(node.node_in_bigMap); break; } } } }
private void onDragon_Born(ActorRoot actor) { DragonNode node = this.getDragonNode(actor.ObjID, actor.ActorControl.GetActorSubSoliderType()); DebugHelper.Assert(node != null, "onDragon_Born node == null, check out..."); if (node != null) { node.SetData(actor.gameObject.transform.position, actor.ActorControl.GetActorSubSoliderType(), actor.ObjID, this.m_b5v5); node.ShowDead(actor.ActorControl.IsDeadState); byte actorSubSoliderType = actor.ActorControl.GetActorSubSoliderType(); if (((actorSubSoliderType == 8) || (actorSubSoliderType == 9)) || (actorSubSoliderType == 13)) { MinimapSys theMinimapSys = Singleton <CBattleSystem> .GetInstance().TheMinimapSys; bool flag = (theMinimapSys != null) && (theMinimapSys.CurMapType() == MinimapSys.EMapType.Mini); if (flag) { TowerHit._play_effect("Prefab_Skill_Effects/tongyong_effects/Indicator/blin_01_c.prefab", 3f, !flag ? node.node_in_bigMap : node.node_in_smallMap); } switch (actorSubSoliderType) { case 7: MiniMapSysUT.SetMapElement_EventParam(node.node_in_bigMap, false, MinimapSys.ElementType.Dragon_3, actor.ObjID, 0); break; case 8: MiniMapSysUT.SetMapElement_EventParam(node.node_in_bigMap, false, MinimapSys.ElementType.Dragon_5_big, actor.ObjID, 0); break; case 9: MiniMapSysUT.SetMapElement_EventParam(node.node_in_bigMap, false, MinimapSys.ElementType.Dragon_5_small, actor.ObjID, 0); break; } MiniMapSysUT.RefreshMapPointerBig(node.node_in_bigMap); } switch (actorSubSoliderType) { case 8: Singleton <CSoundManager> .GetInstance().PlayBattleSound2D("Play_DaLong_VO_Refresh"); break; case 9: Singleton <CSoundManager> .GetInstance().PlayBattleSound2D("Play_XiaoLong_VO_Refresh"); break; default: Singleton <CSoundManager> .GetInstance().PlayBattleSound2D("Play_BaoJun_VO_Anger"); break; } } }
public void Init(GameObject node, GameObject bigNode, bool b5V5) { this.m_b5v5 = b5V5; Singleton <EventRouter> .GetInstance().AddEventHandler <ActorRoot>("Dragon_born", new Action <ActorRoot>(this.onDragon_Born)); Singleton <EventRouter> .GetInstance().AddEventHandler <ActorRoot>("Dragon_dead", new Action <ActorRoot>(this.onDragon_Dead)); for (int i = 0; i < node.transform.childCount; i++) { node.transform.GetChild(i).gameObject.CustomSetActive(false); } for (int j = 0; j < bigNode.transform.childCount; j++) { bigNode.transform.GetChild(j).gameObject.CustomSetActive(false); } this.node_ary.Add(new DragonNode(node, bigNode, "d_3", 7, 0)); this.node_ary.Add(new DragonNode(node, bigNode, "d_5_big", 8, 0)); this.node_ary.Add(new DragonNode(node, bigNode, "d_5_small_1", 9, 13)); this.node_ary.Add(new DragonNode(node, bigNode, "d_5_small_2", 9, 13)); SpawnGroup group = null; ListView <SpawnGroup> spawnGroups = Singleton <BattleLogic> .instance.mapLogic.GetSpawnGroups(); if (spawnGroups != null) { for (int k = 0; k < spawnGroups.Count; k++) { group = spawnGroups[k]; if ((group != null) && (group.NextGroups.Length == 0)) { ActorMeta meta = group.TheActorsMeta[0]; ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(meta.ConfigId); if ((dataCfgInfoByCurLevelDiff != null) && ((((dataCfgInfoByCurLevelDiff.bSoldierType == 8) || (dataCfgInfoByCurLevelDiff.bSoldierType == 9)) || (dataCfgInfoByCurLevelDiff.bSoldierType == 7)) || (dataCfgInfoByCurLevelDiff.bSoldierType == 13))) { DragonNode node2 = this.getDragonNode(dataCfgInfoByCurLevelDiff.bSoldierType); if (node2 != null) { node2.spawnGroup = group; node2.SetData(group.gameObject.transform.position, dataCfgInfoByCurLevelDiff.bSoldierType, 0, this.m_b5v5); node2.ShowDead(true); MiniMapSysUT.RefreshMapPointerBig(node2.node_in_bigMap); } } } } } if (Singleton <WatchController> .GetInstance().IsWatching) { this.m_cdTimer = Singleton <CTimerManager> .GetInstance().AddTimer(0x3e8, 0, new CTimer.OnTimeUpHandler(this.OnCDTimer)); } }
private void onDragon_Dead(ActorRoot actor) { DragonNode node = this.getDragonNode(actor.ObjID, actor.ActorControl.GetActorSubSoliderType()); if (node != null) { node.SetData(actor.gameObject.transform.position, actor.ActorControl.GetActorSubSoliderType(), actor.ObjID, this.m_b5v5); node.ShowDead(actor.ActorControl.IsDeadState); node.objid = 0; SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if ((curLvelContext != null) && (curLvelContext.iLevelID == 0x4e29)) { node.Recycle(); } } }