summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Unit/Events/EventMesh_AfterImage.cs
blob: 76d5060e6ffce1c4d1f15280acbe07d5aab04fe0 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
using UnityEngine;

public class EventMesh_AfterImage : AnimationEventBase
{
	public enum ESpawnRange // 生成残影的范围
	{
		Once                       = 0, // 只生成一个残影
		Duration                   = 1, // 给定一个时间范围内
		WaitForAfterImageStopEvent = 2, // 等待触发afterImageStopEvent
		Manual                     = 3, // 手动停止生成
	}

	public enum ETimeMode
	{
		FrameBased = 0,
		FixedTime = 1,
	}

	public enum ESpawnPosition 
	{
		InitPosition = 0, // 在触发事件的位置生成
		Follow       = 1, // 跟随
	}

	public enum ESpawnMode
	{
		Count    = 0, // 生成固定数量个,间隔平均
		Interval = 1, // 等时间间隔生成
		Curve    = 2, // 曲线
	}

	public enum EEffect // 效果
	{
		Original   = 0, // 原样
		RimLight   = 1, // 边缘光
		FullColor  = 2, // 全着色
		Ink        = 3, // 墨水效果
		Distorsion = 4, // 扭曲
		Dissolve   = 5, // 溶解
	}

    public override TimelineEventProxy.EEventType type { get { return TimelineEventProxy.EEventType.EventMesh_AfterImage; } }
    public override string shortName { get { return "A"; } }

	public ETimeMode timeMode;

	[Comment("[ 残影生成 ]", TextAnchor.MiddleCenter)]
	public ESpawnRange spawnRange;

	[When("spawnRange", ESpawnRange.Duration), AndWhen("timeMode", ETimeMode.FixedTime), Tooltip("整个生成的持续时间(按时间,scaledTime)")]
	public float durationInFixedTime;
	[When("spawnRange", ESpawnRange.Duration), AndWhen("timeMode", ETimeMode.FrameBased), Tooltip("整个生成的持续时间(按帧, unscaledTime)")]
	public float durationInFrame;

	public ESpawnPosition spawnPosition;

	public ESpawnMode spawnMode;
	[When("spawnMode", ESpawnMode.Count)]
	public int spawnCount;
	[When("spawnMode", ESpawnMode.Interval), AndWhen("timeMode", ETimeMode.FixedTime)]
	public float intervalInFixedTime;
	[When("spawnMode", ESpawnMode.Interval), AndWhen("timeMode", ETimeMode.FrameBased)]
	public float intervalInFrame;
	[When("spawnMode", ESpawnMode.Curve)]
	public AnimationCurve spawnCurve;

	[Comment("[ 残影效果 ]", TextAnchor.MiddleCenter)]
	public EEffect effect;

	[When("timeMode", ETimeMode.FixedTime), Tooltip("单个残影持续时间(按时间,scaledTime)")]
	public float lifetimeInFixedTime;
	[When("timeMode", ETimeMode.FrameBased), Tooltip("单个残影持续时间(按帧, unscaledTime)")]
	public float lifetimeInFrame;

	[When("effect", EEffect.RimLight)]
	[HDR] public Color rimColor;

	[HDR] public Color color;
}