From 2a9c6adc48bc26a47b289a0535fa21a191d3797e Mon Sep 17 00:00:00 2001
From: wangguan <wangguan@kt007.com>
Date: Sat, 12 Dec 2020 16:53:48 +0800
Subject: [PATCH] 上传的时候不算新手引导关卡

---
 Assets/Scripts/TowerDefense/UI/HUD/PlacementTile.cs |   34 ++++++++++++++++++++++++++++++++--
 1 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/Assets/Scripts/TowerDefense/UI/HUD/PlacementTile.cs b/Assets/Scripts/TowerDefense/UI/HUD/PlacementTile.cs
index 47d9a50..47250c6 100644
--- a/Assets/Scripts/TowerDefense/UI/HUD/PlacementTile.cs
+++ b/Assets/Scripts/TowerDefense/UI/HUD/PlacementTile.cs
@@ -1,7 +1,6 @@
 using UnityEngine;
 using TowerDefense.Level;
-using UnityEditor;
-using KTGMGemClient;
+using Core.Utilities;
 
 namespace TowerDefense.UI.HUD
 {
@@ -66,6 +65,14 @@
         //public ParticleSystem myPS;//可以升级的特效
 
         public ParticleSystem myOpenPS;//购买后的特效
+        public ParticleSystem myPutPS;//交换塔位置后的特效
+
+        public GameObject myDragSelectPS;//推拽时候移动到当前塔的特效
+
+        /// <summary>
+        /// 所在的格子坐标
+        /// </summary>
+        public IntVector2 GridPosition { get; set; }
 
         /// <summary>
         /// Update the state of this placement tile
@@ -164,13 +171,28 @@
             {
                 canPlaceRenderer.enabled = isOn;
             }
+            if (myDragSelectPS.activeSelf != isOn)
+            {
+                myDragSelectPS.SetActive(isOn);
+            }
+            // if (isOn)
+            // {
+            //     myDragSelectPS.Play();
+            // }
+            // else
+            // {
+            //     myDragSelectPS.Stop();
+            // }
+
             if (isOn && towerName != "")
             {
                 SetTowerVirtualshadow(towerName);
+                EndlessWaveLineManager.instance.SetWaveLineShow(GridPosition.x, true);
             }
             else if (!isOn && towerVSRenderer.enabled)
             {
                 towerVSRenderer.enabled = false;
+                EndlessWaveLineManager.instance.SetWaveLineShow(GridPosition.x, false);
             }
 
         }
@@ -277,6 +299,14 @@
         public void BuyPs()
         {
             myOpenPS?.Play();
+            AudioSourceManager.Ins.Play(AudioEnum.OpenTowerPlace);
+            EndlessRandomTower.instance.CheckMoney();
         }
+
+        public void PutPs()
+        {
+            myPutPS?.Play();
+        }
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1