From 22891bf59032ba88262824255a706d652031384b Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 10 Mar 2022 14:07:40 +0800 Subject: * move folder --- Assets/Scripts/Unit/AfterImage/AfterImageAvatar.cs | 49 ---------------------- 1 file changed, 49 deletions(-) delete mode 100644 Assets/Scripts/Unit/AfterImage/AfterImageAvatar.cs (limited to 'Assets/Scripts/Unit/AfterImage/AfterImageAvatar.cs') diff --git a/Assets/Scripts/Unit/AfterImage/AfterImageAvatar.cs b/Assets/Scripts/Unit/AfterImage/AfterImageAvatar.cs deleted file mode 100644 index ec04f3be..00000000 --- a/Assets/Scripts/Unit/AfterImage/AfterImageAvatar.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -// 单个残影的参数 -public struct AfterImageAvatarInfo -{ - -} - -public class AfterImageAvatar : MonoBehaviour -{ - #region inspector - public Renderer[] renderers; - - public Animator animator; - #endregion - - float m_CurTime; - - float m_LifeTime; - - public void Initialize(AfterImageAvatarInfo info) - { - - } - - public void Initialize(UnitController prototype) - { - transform.position = prototype.transform.position; - - animator.runtimeAnimatorController = prototype.unitAnimation.animator.runtimeAnimatorController; - animator.Play(prototype.unitAnimation.baseLayer.stateHash, 0, prototype.unitAnimation.baseLayer.playbackNormalizedTime); - animator.speed = 0.02f; - animator.Update(1 / 60f); - - m_LifeTime = 0.2f; - } - - public void Update() - { - m_CurTime += Time.deltaTime; - if (m_CurTime > m_LifeTime) - { - GameObject.Destroy(this.gameObject); - } - } - -} -- cgit v1.1-26-g67d0