From 3ad68338dff5229d3fd8ec9f3ee994d7e37fb0ed Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 2 Sep 2021 09:59:31 +0800 Subject: *override rootmotion --- Assets/Scripts/Unit/Controller/PCController.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Assets/Scripts/Unit/Controller/PCController.cs') diff --git a/Assets/Scripts/Unit/Controller/PCController.cs b/Assets/Scripts/Unit/Controller/PCController.cs index 93228d31..ba12b3f5 100644 --- a/Assets/Scripts/Unit/Controller/PCController.cs +++ b/Assets/Scripts/Unit/Controller/PCController.cs @@ -8,6 +8,8 @@ public class PCController : UnitController { public static PCController instance; + private UnitAfterImage unitAfterImage; + public override UnitType type { get { return UnitType.PC; } } private void Awake() @@ -24,11 +26,15 @@ public class PCController : UnitController unitAnimation = gameObject.GetOrAddComponent(); unitAnimation.Initialize(); - } + + unitAfterImage = gameObject.GetOrAddComponent(); + unitAfterImage.Initialize(); + } public override void Update() { base.Update(); + unitAfterImage.OnUpdate(); } public override void OnHit(CollisionInfo info) -- cgit v1.1-26-g67d0