| | |
| | | /// <param name="opponent"></param> |
| | | public void DestroyTowerGrid(int xidx) |
| | | { |
| | | // cx test 这里的逻辑已经不走了 |
| | | for (int i = 0; i < AttackRowNumbers; ++i) |
| | | { |
| | | if (TowerDestroyArr[xidx, i]) continue; |
| | |
| | | } |
| | | } |
| | | |
| | | // 红心减少逻辑 |
| | | // HealthHeartState.instance.killHeart(false); |
| | | GameOver(); |
| | | overTimer = new Timer(1.2f, SafelyCallGameOverEvent); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 爱心数量为0,游戏结束 |
| | | /// </summary> |
| | | private void AllHeartLose() |
| | | { |
| | | // 清理技能 |
| | | EndlessBossSkillManager.instance.ClearSkillList(); |
| | | |
| | | // 停止所有兵线的出兵 |
| | | for (int i = 0; i < TotalWaveLines; ++i) |
| | | { |
| | | EndlessLevelManager.instance.StopWaveLine(i); |
| | | } |
| | | |
| | | // 让所有兵线上已经生成的所有agent播放一个死亡动画然后销毁 |
| | | WaveLineAgentInsMgr[] waveLineAgentIns = AgentInsManager.instance.GetWaveLineList(); |
| | | |
| | | for (int i = 0; i < waveLineAgentIns.Length; ++i) |
| | | { |
| | | while (waveLineAgentIns[i].listAgent.Count > 0) |
| | | { |
| | | waveLineAgentIns[i].listAgent[0].PlayDeath(); |
| | | } |
| | | } |
| | | |
| | | GameOver(); |
| | | overTimer = new Timer(1.2f, SafelyCallGameOverEvent); |
| | | } |
| | | |
| | | private void SafelyCallGameOverEvent() |
| | |
| | | if (placeObj != null) |
| | | m_CurrentArea = placeObj.GetComponent<IPlacementArea>(); |
| | | placeObj = GameObject.FindGameObjectWithTag("PlaceTowerOpponent"); |
| | | EventCenter.Ins.Add((int)KTGMGemClient.EventType.EndlessHeartAllLose, AllHeartLose); |
| | | } |
| | | |
| | | /// <summary> |