From bda34f905f38c2bb8f1b17866890123d34210ec4 Mon Sep 17 00:00:00 2001 From: wangguan <wangguan@kt007.com> Date: Fri, 27 Nov 2020 15:06:09 +0800 Subject: [PATCH] 出结算的时候隐藏特效 --- Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs b/Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs index 9e701db..afa810b 100644 --- a/Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs +++ b/Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs @@ -52,6 +52,8 @@ public GameObject darkGroundImg; + private CanvasGroup canvasGroup; + /// <summary> /// Awake is called when the script instance is being loaded. /// </summary> @@ -148,6 +150,8 @@ //CalculateSkillSliderValue(); transform.Find("Panel/Energy").gameObject.SetActive(false); + canvasGroup = transform.Find("Panel").GetComponent<CanvasGroup>(); + EventCenter.Ins.Add<int>((int)KTGMGemClient.EventType.EnergyUp, EnergyUp); EventCenter.Ins.Add((int)KTGMGemClient.EventType.SkillLevelUpBuff, SkillLevelUpBuff); @@ -159,7 +163,7 @@ int guide = PlayerPrefs.GetInt("GemBattleGuide"); GameConfig.IsNewbie = guide == 0; GameConfig.IsNewbieStart = GameConfig.IsNewbie; - + if (GameConfig.IsNewbie) { Debug.Log("开始新手引导"); @@ -175,6 +179,13 @@ } } + public void GameOver() + { + canvasGroup.alpha = 0; + canvasGroup.interactable = false; + GuideEnergyUp(0); + } + /// <summary> /// 所有数据读取完毕 /// </summary> -- Gitblit v1.9.1