From 9af3e3dbede79e70262ff9d206299dcca363c1bb Mon Sep 17 00:00:00 2001
From: chenxin <chenxin6991@163.com>
Date: Thu, 26 Nov 2020 17:45:08 +0800
Subject: [PATCH] 木桩技能修改

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

diff --git a/Assets/Scripts/TowerDefense/UI/EnergyUICtl.cs b/Assets/Scripts/TowerDefense/UI/EnergyUICtl.cs
index 5b4f9cb..04d3c08 100644
--- a/Assets/Scripts/TowerDefense/UI/EnergyUICtl.cs
+++ b/Assets/Scripts/TowerDefense/UI/EnergyUICtl.cs
@@ -12,15 +12,33 @@
     public Image energyScaleMask;
 
     /// <summary>
+    /// 充能条满后,在场景内播放的特效
+    /// </summary>
+    public GameObject energyEffPrefab;
+
+    /// <summary>
     /// 当前的能量条进度.10份进度.
     /// </summary>
     protected int currentProgress;
+
+    protected Vector3 vec3EffectPlay;
 
     // Start is called before the first frame update
     void Start()
     {
         currentProgress = 0;
         //this.SetEnergyProgress(0);
+    }
+
+    /// <summary>
+    /// 设置要播放特效的位置信息.
+    /// </summary>
+    /// <param name="vec"></param>
+    public void SetEffectPlayPos( Vector3 vec)
+    {
+        vec3EffectPlay.x = vec.x;
+        vec3EffectPlay.y = vec.y;
+        vec3EffectPlay.z = vec.z;
     }
 
     /// <summary>
@@ -59,6 +77,12 @@
         currentProgress = pro;
     }
 
+    public void SetEnergyProcessFloat( float fpro)
+    {
+        energyScaleMask.rectTransform.DOScaleY(fpro / 10.0f, 0.0f);
+        currentProgress = (int)Mathf.Floor(fpro);
+    }
+
     // Update is called once per frame
     void Update()
     {

--
Gitblit v1.9.1