summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Unit/Components/UnitAfterImage.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Unit/Components/UnitAfterImage.cs')
-rw-r--r--Assets/Scripts/Unit/Components/UnitAfterImage.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/Assets/Scripts/Unit/Components/UnitAfterImage.cs b/Assets/Scripts/Unit/Components/UnitAfterImage.cs
new file mode 100644
index 00000000..369f63c9
--- /dev/null
+++ b/Assets/Scripts/Unit/Components/UnitAfterImage.cs
@@ -0,0 +1,41 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class AfterImageSpawner
+{
+ private float m_CurTime;
+
+ private float m_Duration;
+
+ public void OnUpdate()
+ {
+ float dt = Time.deltaTime;
+ m_CurTime += dt;
+
+
+ }
+
+}
+
+[DisallowMultipleComponent]
+public class UnitAfterImage : UnitComponent
+{
+
+ private List<AfterImageSpawner> m_Spawners;
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+
+ if(m_Spawners != null)
+ {
+ for(int i = 0; i < m_Spawners.Count; ++i)
+ {
+ m_Spawners[i].OnUpdate();
+ }
+ }
+
+ }
+
+} \ No newline at end of file