From ab1a24fa8aaed0c9c678ce6771bb7e9031b79476 Mon Sep 17 00:00:00 2001
From: wangguan <wangguan@kt007.com>
Date: Fri, 30 Oct 2020 16:04:05 +0800
Subject: [PATCH] 新手引导宝石上阵特效

---
 Assets/Scripts/TowerDefense/UI/HUD/EndlessGameUI.cs |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/Assets/Scripts/TowerDefense/UI/HUD/EndlessGameUI.cs b/Assets/Scripts/TowerDefense/UI/HUD/EndlessGameUI.cs
index 39f916e..3dfb8d9 100644
--- a/Assets/Scripts/TowerDefense/UI/HUD/EndlessGameUI.cs
+++ b/Assets/Scripts/TowerDefense/UI/HUD/EndlessGameUI.cs
@@ -1359,6 +1359,8 @@
             }
         }
 
+
+
         /// <summary>
         /// 播放宝石出现特效
         /// </summary>
@@ -1379,6 +1381,28 @@
             Destroy(obj, ps.main.duration);
         }
 
+        /// <summary>
+        /// 播放升级特效
+        /// </summary>
+        /// <param name="worldPos"></param>
+        public void GuidePlayUpgradeEffect(Vector3 position)
+        {
+            GameObject effect = TowerUpgradeEffectPrefab;
+
+            // 在sTower的位置播放升级特效
+            GameObject obj = Instantiate(effect);
+            obj.transform.position = position;
+            Vector3 pos = obj.transform.position;
+            pos.y += 5f;
+            obj.transform.position = pos;
+            ParticleSystem ps = obj.GetComponent<ParticleSystem>();
+
+            if (ps == null)
+                ps = obj.transform.GetChild(0).GetComponent<ParticleSystem>();
+            ps.Play();
+            Destroy(obj, ps.main.duration);
+        }
+
         protected void ProcessFeatureTower(Tower ctower)
         {
             if (ctower.towerFeature == EFeatureTower.GrowUp)

--
Gitblit v1.9.1