From 02dec02a09fe9c0074631a73838af013738569fa Mon Sep 17 00:00:00 2001
From: wangguan <wangguan@kt007.com>
Date: Thu, 17 Dec 2020 15:38:52 +0800
Subject: [PATCH] 修改由于特效替换导致的一些BUG 延迟1秒刷新可以购买几级塔 替换抽卡精灵图标 新手引导释放技能延迟2S后再弹出对话框

---
 Assets/Scripts/Guide/GuidePanelNew.cs |   40 ++++++++++++++++++++++------------------
 1 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/Assets/Scripts/Guide/GuidePanelNew.cs b/Assets/Scripts/Guide/GuidePanelNew.cs
index acad04e..7779bd8 100644
--- a/Assets/Scripts/Guide/GuidePanelNew.cs
+++ b/Assets/Scripts/Guide/GuidePanelNew.cs
@@ -95,12 +95,12 @@
         wood1 = transform.Find("Image_Wood1").GetComponent<ImageWood>();
         wood1.GetComponent<RectTransform>().anchoredPosition *= tmpScale;
         wood1PS1 = wood1.transform.Find("Mu/Particle System").GetComponent<ParticleSystem>();
-        wood1PS2 = wood1.transform.Find("Mu_02/Particle System").GetComponent<ParticleSystem>();
+        //wood1PS2 = wood1.transform.Find("Mu_02/Particle System").GetComponent<ParticleSystem>();
 
         wood2 = transform.Find("Image_Wood2").GetComponent<ImageWood2>();
         wood2.GetComponent<RectTransform>().anchoredPosition *= tmpScale;
         wood2PS1 = wood2.transform.Find("Mu/Particle System").GetComponent<ParticleSystem>();
-        wood2PS2 = wood2.transform.Find("Mu_02/Particle System").GetComponent<ParticleSystem>();
+        //wood2PS2 = wood2.transform.Find("Mu_02/Particle System").GetComponent<ParticleSystem>();
 
         wood1.gameObject.SetActive(false);
         wood2.gameObject.SetActive(false);
@@ -108,13 +108,13 @@
         fire = transform.Find("Image_Fire").GetComponent<ImageFire1>();
         fire.GetComponent<RectTransform>().anchoredPosition *= tmpScale;
         firePS1 = fire.transform.Find("Huo/Particle System").GetComponent<ParticleSystem>();
-        firePS2 = fire.transform.Find("Huo_02/Particle System").GetComponent<ParticleSystem>();
+        //firePS2 = fire.transform.Find("Huo_02/Particle System").GetComponent<ParticleSystem>();
         fire.gameObject.SetActive(false);
 
         water = transform.Find("Image_Water").GetComponent<ImageWater>();
         water.GetComponent<RectTransform>().anchoredPosition *= tmpScale;
         waterPS1 = water.transform.Find("Shui/Particle System").GetComponent<ParticleSystem>();
-        waterPS2 = water.transform.Find("Shui_02/Particle System").GetComponent<ParticleSystem>();
+        //waterPS2 = water.transform.Find("Shui_02/Particle System").GetComponent<ParticleSystem>();
         water.gameObject.SetActive(false);
 
         towerPos = transform.Find("Image_TowerPos").GetComponent<ImageTowerPos>();
@@ -212,15 +212,15 @@
 
 
     ImageWood wood1;
-    ParticleSystem wood1PS1, wood1PS2;//出现的特效
+    ParticleSystem wood1PS1;//出现的特效
     ImageWood2 wood2;//两个用来合成的mu元素
-    ParticleSystem wood2PS1, wood2PS2;
+    ParticleSystem wood2PS1;
 
     ImageFire1 fire;//火元素
-    ParticleSystem firePS1, firePS2;
+    ParticleSystem firePS1;
 
     ImageWater water;//水元素
-    ParticleSystem waterPS1, waterPS2;
+    ParticleSystem waterPS1;
 
     /// <summary>
     /// 步骤2:购买---购买---合成---上阵  事件广播结束,不走回调
@@ -253,7 +253,7 @@
             wood1.transform.Find("Image_2").gameObject.SetActive(false);
             wood1.enabled = false;
             wood1PS1.Play();
-            wood1PS2.Play();
+            //wood1PS2.Play();
             RemoveButtonListener(towerBuyBtn);
             AddButtonListener(towerBuyBtn, Step2_2);
             StartCoroutine(ShowRimTip(strArray[1]));
@@ -278,7 +278,7 @@
         {
             wood2.gameObject.SetActive(true);
             wood2PS1.Play();
-            wood2PS2.Play();
+            // wood2PS2.Play();
             //fire2.enabled = false;
             DestoryButtonListener(towerBuyBtn);
             towerBuyBtn.gameObject.SetActive(false);
@@ -571,7 +571,7 @@
             //fire.transform.Find("Image_2").gameObject.SetActive(false);
             water.enabled = true;
             waterPS1.Play();
-            waterPS2.Play();
+            //waterPS2.Play();
             RemoveButtonListener(towerBuyBtn);
             towerBuyBtn.gameObject.SetActive(false);
 
@@ -657,21 +657,25 @@
         StartCoroutine(ShowRimTip("释放技能"));
     }
 
+    string[] laterStr;
     public void SkillRelease(string[] str, Action ac)
     {
+
         GameObject.Find("UICamera/MainUI/BloodUI").SetActive(true);
 
         RemoveButtonListener(skillBtn.gameObject);
         SetRimActive(false);
         CloseGuidance();
-
-        SetGuideUI(true);
         callBack = ac;
-        StartShowWord(str, ShowFinishPanel);
-        // charForeach.StartFinalShowWord(str, ac, () =>
-        // {
-        //     finishPS.Play();
-        // });
+
+        laterStr = str;
+        Invoke("LaterShow", 2f);
+    }
+
+    private void LaterShow()
+    {
+        SetGuideUI(true);
+        StartShowWord(laterStr, ShowFinishPanel);
 
     }
 

--
Gitblit v1.9.1