wangguan
2020-11-17 51058a97a49bf16789010c8306909cbc5356785c
Assets/Scripts/TowerDefense/UI/HUD/EndlessGameUI.cs
@@ -255,6 +255,10 @@
        /// </summary>
        public GameObject TowerAppearEffectPrefab;
        public GameObject TowerUpgradeEffectPrefabGuide;//新手导航特效Layer是UI
        public GameObject TowerAppearEffectPrefabGuide;//新手导航特效Layer是UI
        //首次购买宝石特效
        public GameObject fireAppearEffect1;
        public GameObject fireAppearEffect2;
@@ -1698,6 +1702,25 @@
            Destroy(obj, ps.main.duration);
        }
        public void PlayAppearEffectGuide(Vector3 worldPos)
        {
            GameObject obj = Instantiate(TowerAppearEffectPrefabGuide);
            obj.transform.position = worldPos;
            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);
        }
        /// <summary>
        /// 播放宝石出现特效
        /// </summary>
@@ -1718,17 +1741,17 @@
            Destroy(obj, ps.main.duration);
        }
        /// <summary>
        /// 播放升级特效
        /// </summary>
        /// <param name="worldPos"></param>
        public void GuidePlayUpgradeEffect(Vector3 position)
        {
            GameObject effect = TowerUpgradeEffectPrefab;
            // 在sTower的位置播放升级特效
            GameObject obj = Instantiate(effect);
            GameObject obj = Instantiate(TowerUpgradeEffectPrefabGuide);
            obj.transform.position = position;
            Vector3 pos = obj.transform.position;
            pos.y += 5f;
            obj.transform.position = pos;
@@ -1736,6 +1759,7 @@
            if (ps == null)
                ps = obj.transform.GetChild(0).GetComponent<ParticleSystem>();
            ps.Play();
            Destroy(obj, ps.main.duration);
        }