From a9bf69ea82070c8e9723e610cb7cea430f2daa11 Mon Sep 17 00:00:00 2001 From: wangguan <wangguan@kt007.com> Date: Thu, 10 Dec 2020 20:40:04 +0800 Subject: [PATCH] 调整技能点击区域 --- Assets/Scripts/Guide/GuidePanelNew.cs | 76 ++++++++++++++++++++++++++------------ 1 files changed, 52 insertions(+), 24 deletions(-) diff --git a/Assets/Scripts/Guide/GuidePanelNew.cs b/Assets/Scripts/Guide/GuidePanelNew.cs index fc88ffd..91d8be3 100644 --- a/Assets/Scripts/Guide/GuidePanelNew.cs +++ b/Assets/Scripts/Guide/GuidePanelNew.cs @@ -140,6 +140,7 @@ skillBtn.interactable = false; finishPS = transform.Find("Effect_UI_YinDaoJieShu/Particle System (3)").GetComponent<ParticleSystem>(); + towerBuyBtn.gameObject.SetActive(false); } @@ -186,6 +187,8 @@ { //关闭对话框 SetGuideUI(false); + towerBuyBtn.gameObject.SetActive(true); + //开箱 boxPanel.ChangeType(GuideBoxType.Wood, Step1Finish); } @@ -217,6 +220,7 @@ { strArray = str; tmpMask.enabled = false; + AddButtonListener(towerBuyBtn, Step2_1); Image btnImg = towerBuyBtn.GetComponent<Image>(); InitRectGuidance(btnImg, 159, 73.5f, Vector2.one); @@ -230,9 +234,6 @@ private void Step2_1() { Wood1Appear(); - RemoveButtonListener(towerBuyBtn); - AddButtonListener(towerBuyBtn, Step2_2); - StartCoroutine(ShowRimTip(strArray[1])); } private void Wood1Appear() @@ -244,6 +245,9 @@ wood1.enabled = false; wood1PS1.Play(); wood1PS2.Play(); + RemoveButtonListener(towerBuyBtn); + AddButtonListener(towerBuyBtn, Step2_2); + StartCoroutine(ShowRimTip(strArray[1])); } } @@ -254,26 +258,32 @@ { Wood2Appear(); - offectBackground.SetActive(true); - wood1.enabled = true; - wood2.enabled = true; - ShowDragPath(wood2.GetStartP, wood1.GetRect); - RimWood2(); - image_Tip_Rect.gameObject.SetActive(false); + //StartCoroutine(ShowRimTip(strArray[2])); } private void Wood2Appear() { - wood2.gameObject.SetActive(true); - wood2PS1.Play(); - wood2PS2.Play(); - //fire2.enabled = false; - DestoryButtonListener(towerBuyBtn); - SetRimActive(false); - CloseGuidance(); - tmpMask.enabled = true; + if (!wood2.gameObject.activeSelf) + { + wood2.gameObject.SetActive(true); + wood2PS1.Play(); + wood2PS2.Play(); + //fire2.enabled = false; + DestoryButtonListener(towerBuyBtn); + towerBuyBtn.gameObject.SetActive(false); + + SetRimActive(false); + CloseGuidance(); + tmpMask.enabled = true; + offectBackground.SetActive(true); + wood1.enabled = true; + wood2.enabled = true; + ShowDragPath(wood2.GetStartP, wood1.GetRect); + RimWood2(); + image_Tip_Rect.gameObject.SetActive(false); + } } @@ -351,6 +361,8 @@ { //关闭对话框 SetGuideUI(false); + towerBuyBtn.gameObject.SetActive(true); + //开箱 boxPanel.ChangeType(GuideBoxType.Fire, cb); } @@ -370,7 +382,6 @@ InitRectGuidance(btnImg, 159, 73.5f, Vector2.one); SetRimPos(towerBuyBtn); StartCoroutine(ShowRimTip(strArray[0])); - } /// <summary> @@ -379,8 +390,6 @@ private void Step4_1() { FireAppear(); - RemoveButtonListener(towerBuyBtn); - Step4_2(); } private void FireAppear() @@ -392,6 +401,10 @@ fire.enabled = true; firePS1.Play(); firePS1.Play(); + RemoveButtonListener(towerBuyBtn); + towerBuyBtn.gameObject.SetActive(false); + + Step4_2(); } } @@ -476,6 +489,8 @@ } else if (currentIndex == 2) { + tmpMask.enabled = true; + SetRimActive(false); StopShowDragPath(true); CloseGuidance(); @@ -497,6 +512,8 @@ { //关闭对话框 SetGuideUI(false); + towerBuyBtn.gameObject.SetActive(true); + //开箱 boxPanel.ChangeType(GuideBoxType.Water, cb); } @@ -524,8 +541,6 @@ private void Step6_1() { WaterAppear(); - RemoveButtonListener(towerBuyBtn); - Step6_2(); } private void WaterAppear() @@ -537,6 +552,10 @@ water.enabled = true; waterPS1.Play(); waterPS2.Play(); + RemoveButtonListener(towerBuyBtn); + towerBuyBtn.gameObject.SetActive(false); + + Step6_2(); } } /// <summary> @@ -603,6 +622,7 @@ /// </summary> public void GuideEnergyUp() { + GameObject.Find("UICamera/MainUI/BloodUI").SetActive(false); EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.GuideEnergyUp, 100); tmpMask.enabled = false; @@ -619,15 +639,23 @@ public void SkillRelease(string[] str, Action ac) { + GameObject.Find("UICamera/MainUI/BloodUI").SetActive(true); + RemoveButtonListener(skillBtn.gameObject); SetRimActive(false); CloseGuidance(); SetGuideUI(true); - StartShowWord(str, ac); - finishPS.Play(); + //StartShowWord(str, ac); + + charForeach.StartFinalShowWord(str, ac, () => + { + finishPS.Play(); + }); + } + public void FinishGuide() { towerBuyBtn.gameObject.SetActive(true); -- Gitblit v1.9.1