chenxin
2020-11-19 fdfb88a9ee3652e716e603f759d3be5dcc0bd3bd
Assets/Scripts/TowerDefense/Agents/BubbleBombAgent.cs
@@ -1,4 +1,4 @@
using Core.Utilities;
using DG.Tweening;
using UnityEngine;
/**
@@ -48,6 +48,7 @@
        /// </summary>
        public void Reset()
        {
            CanMove = true;
            bInDeathState = false;
        }
@@ -56,7 +57,8 @@
        /// </summary>
        public void PlayNormalEffect()
        {
            NormalEffect.Play();
            if (NormalEffect != null)
                NormalEffect.Play();
        }
        /// <summary>
@@ -64,8 +66,8 @@
        /// </summary>
        public void StopNormalEffect()
        {
            NormalEffect.Stop();
            NormalEffect.Clear();
            if (NormalEffect != null)
                NormalEffect.Stop();
        }
        /// <summary>
@@ -73,7 +75,8 @@
        /// </summary>
        public void PlayExplodeEffect()
        {
            ExplodeEffect.Play();
            if (ExplodeEffect != null)
                ExplodeEffect.Play();
        }
        /// <summary>
@@ -81,8 +84,8 @@
        /// </summary>
        public void StopExplodeEffect()
        {
            ExplodeEffect.Stop();
            ExplodeEffect.Clear();
            if (ExplodeEffect != null)
                ExplodeEffect.Stop();
        }
        /// <summary>
@@ -95,7 +98,24 @@
        protected override void Update()
        {
        }
        protected override void LateUpdate()
        {
            
        }
        public override void Initialize()
        {
            this.configuration.bInvincible = true;
            mDefaultScale = this.transform.localScale;
            Sequence agentTweenSeq = DOTween.Sequence();
            var ss = mDefaultScale * 0.3f;
            this.transform.localScale = this.transform.localScale * 0.3f;
            Tweener agScale = this.transform.DOScale(mDefaultScale, 0.3f);
            agentTweenSeq.Append(agScale);
            agentTweenSeq.AppendCallback(beDamageStart);
        }
    }
}