summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Unit/Components/UnitAfterImage.cs
blob: 622e87bad88b911e13d041f8f3d39c4adddd5abb (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
42
43
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

// Unit残影,通过复制avatar实现

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();
			}
		}

	}

}