From d4eadbf1bac0dba434d4c35e60e643143e770faa Mon Sep 17 00:00:00 2001
From: wangguan <wangguan@kt007.com>
Date: Fri, 11 Dec 2020 19:56:00 +0800
Subject: [PATCH] 新手引导

---
 Assets/Scripts/Guide/GuidePanelNew.cs |   34 +++++++++++++++++++++++++++-------
 1 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/Assets/Scripts/Guide/GuidePanelNew.cs b/Assets/Scripts/Guide/GuidePanelNew.cs
index 5e595ac..8d4d214 100644
--- a/Assets/Scripts/Guide/GuidePanelNew.cs
+++ b/Assets/Scripts/Guide/GuidePanelNew.cs
@@ -39,7 +39,9 @@
     ImageTowerPos towerPos3;//塔位标识
 
     Image tmpMask;//自身的阻挡射线Panel
-    ParticleSystem finishPS;
+    //ParticleSystem finishPS;
+    Button finishBtn;
+    Image finishImg;
     void Awake()
     {
         tmpMask = transform.GetComponent<Image>();
@@ -139,7 +141,12 @@
         skillBtn = GameObject.Find("UICamera/BottomCanvas/Panel/Energy/FireSkillBg/SkillBtn").GetComponent<Button>();
         skillBtn.interactable = false;
 
-        finishPS = transform.Find("Effect_UI_YinDaoJieShu/Particle System (3)").GetComponent<ParticleSystem>();
+        finishBtn = transform.Find("FinishImageBtn").GetComponent<Button>();
+        finishImg = finishBtn.transform.Find("FinishImage").GetComponent<Image>();
+        finishImg.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
+        finishBtn.onClick.AddListener(OnClickFinish);
+        finishBtn.gameObject.SetActive(false);
+        //finishPS = transform.Find("Effect_UI_YinDaoJieShu/Particle System (3)").GetComponent<ParticleSystem>();
         towerBuyBtn.gameObject.SetActive(false);
     }
 
@@ -646,13 +653,26 @@
         CloseGuidance();
 
         SetGuideUI(true);
-        //StartShowWord(str, ac);
+        callBack = ac;
+        StartShowWord(str, ShowFinishPanel);
+        // charForeach.StartFinalShowWord(str, ac, () =>
+        // {
+        //     finishPS.Play();
+        // });
 
-        charForeach.StartFinalShowWord(str, ac, () =>
-        {
-            finishPS.Play();
-        });
+    }
 
+    private void ShowFinishPanel()
+    {
+        SetGuideUI(false);
+        //显示引导结束面板,再次点击按钮关闭
+        finishBtn.gameObject.SetActive(true);
+        finishImg.transform.DOScale(Vector3.one, 0.5f);
+    }
+
+    private void OnClickFinish()
+    {
+        callBack?.Invoke();
     }
 
 

--
Gitblit v1.9.1