From ce7efae14eb31bcdfa0d540da6a1ef1457e046ab Mon Sep 17 00:00:00 2001
From: chenxin <chenxin6991@163.com>
Date: Wed, 04 Nov 2020 21:27:39 +0800
Subject: [PATCH] Merge commit '80b4237334a773b29bf69f38532a90ca659b3bfe' into master

---
 Assets/Scripts/TowerDefense/UI/EndlessBossCtrl.cs |   36 +++++++++++++++++++++++++++++++++++-
 1 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/Assets/Scripts/TowerDefense/UI/EndlessBossCtrl.cs b/Assets/Scripts/TowerDefense/UI/EndlessBossCtrl.cs
index b32ece1..14bc0f4 100644
--- a/Assets/Scripts/TowerDefense/UI/EndlessBossCtrl.cs
+++ b/Assets/Scripts/TowerDefense/UI/EndlessBossCtrl.cs
@@ -1,6 +1,8 @@
+using DG.Tweening;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
+using UnityEngine.UI;
 using Core.Utilities;
 
 /**
@@ -22,10 +24,13 @@
         /// </summary>
         public EndlessBossActionState ActionState { get; set; }
 
+        public Image Title;
+
         // Start is called before the first frame update
         private void Start()
         {
-
+            ColorVal = 0;
+            EventCenter.Ins.Add((int)KTGMGemClient.EventType.EndlessBossSkillGlintTitle, Glint);
         }
 
         // Update is called once per frame
@@ -34,6 +39,35 @@
 
         }
 
+        private void Glint()
+        {
+            //设置一个DOTween队列
+            Sequence flashSeq = DOTween.Sequence();
+            Color c = Title.color;
+            c.a = 0;
+            Title.color = c;
+            Title.gameObject.SetActive(true);
+
+            flashSeq.Append(DOTween.To(() => ColorVal, (v) => ColorVal = v, 1, 0.3f));
+            flashSeq.Append(DOTween.To(() => ColorVal, (v) => ColorVal = v, 0, 0.15f));
+            flashSeq.Append(DOTween.To(() => ColorVal, (v) => ColorVal = v, 1, 0.3f));
+            flashSeq.Append(DOTween.To(() => ColorVal, (v) => ColorVal = v, 0, 0.15f));
+            flashSeq.Append(DOTween.To(() => ColorVal, (v) => ColorVal = v, 1, 0.3f));
+            flashSeq.Append(DOTween.To(() => ColorVal, (v) => ColorVal = v, 0, 0.15f));
+        }
+
+        private float ColorVal
+        {
+            get { return Title.color.a; }
+            set
+            {
+                Title.gameObject.SetActive(value != 0);
+                Color c = Title.color;
+                c.a = value;
+                Title.color = c;
+            }
+        }
+
         /// <summary>
         /// 帧事件
         /// </summary>

--
Gitblit v1.9.1