| | |
| | | |
| | | if (EndlessGameUI.instance.state == EndlessGameUI.State.Building) |
| | | EndlessGameUI.instance.CancelGhostPlacement(); |
| | | |
| | | GameObject go = Instantiate(Resources.Load<GameObject>("UI/Final/FinalPanel"), GameObject.Find("UICamera/BottomCanvas").transform); |
| | | FinalPanel panelUI = go.GetComponent<FinalPanel>(); |
| | | panelUI.SetData($"{EndlessLevelManager.instance.CurrentLevel}关 {EndlessLevelManager.instance.WaveManager.CurrentWaveIndex}波", EndlessScoreData.CurrentSocre); |
| | | ShowGameOverPanel(); |
| | | //panelUI.SetPlayEffectAC(PlayEffect); |
| | | //GameObject.Find("UICamera/BottomCanvas").GetComponent<Canvas>().enabled = false; |
| | | |
| | |
| | | // RefreshPropList(); |
| | | // SettlementUI.SetActive(true); |
| | | // PlayEffect(); |
| | | } |
| | | |
| | | private void ShowGameOverPanel() |
| | | { |
| | | GameObject go = Instantiate(Resources.Load<GameObject>("Prefabs/GameOverPanel"), GameObject.Find("UICamera/BottomCanvas").transform); |
| | | EventCenter.Ins.Add((int)KTGMGemClient.EventType.GameOverEnd, GameOverEnd); |
| | | } |
| | | |
| | | private void GameOverEnd() |
| | | { |
| | | EventCenter.Ins.Remove((int)KTGMGemClient.EventType.GameOverEnd, GameOverEnd); |
| | | ShowFinalPanel(); |
| | | } |
| | | |
| | | private void ShowFinalPanel() |
| | | { |
| | | GameObject go = Instantiate(Resources.Load<GameObject>("UI/Final/FinalPanel"), GameObject.Find("UICamera/BottomCanvas").transform); |
| | | FinalPanel panelUI = go.GetComponent<FinalPanel>(); |
| | | panelUI.SetData($"{EndlessLevelManager.instance.CurrentLevel}关 {EndlessLevelManager.instance.WaveManager.CurrentWaveIndex}波", EndlessScoreData.CurrentSocre); |
| | | } |
| | | |
| | | private void PlayEffect() |
| | |
| | | protected void SafelyUnsubscribe() |
| | | { |
| | | LazyLoad(); |
| | | levelManager.LevelCompleted -= Victory; |
| | | if (levelManager != null) |
| | | levelManager.LevelCompleted -= Victory; |
| | | } |
| | | |
| | | /// <summary> |