blob: 369f63c961f004aeff1d16de2e08faa41d95c3b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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();
}
}
}
}
|