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/Events/EventMesh_AfterImage.cs | 82 ++++++++++++++++++---- 1 file changed, 70 insertions(+), 12 deletions(-) (limited to 'Assets/Scripts/Unit/Events') diff --git a/Assets/Scripts/Unit/Events/EventMesh_AfterImage.cs b/Assets/Scripts/Unit/Events/EventMesh_AfterImage.cs index ee792ddc..76d5060e 100644 --- a/Assets/Scripts/Unit/Events/EventMesh_AfterImage.cs +++ b/Assets/Scripts/Unit/Events/EventMesh_AfterImage.cs @@ -2,20 +2,78 @@ public class EventMesh_AfterImage : AnimationEventBase { - public enum ELife - { - FrameBased = 0, - FixedTime = 1, - } + 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 ELife lifeType; - [When("lifeType", (int)ELife.FixedTime), Tooltip("持续时间(按时间,scaledTime)")] - public float durationInFixedTime; - [When("lifeType", (int)ELife.FrameBased), Tooltip("持续时间(按帧, unscaledTime)")] - public float durationInFrame; + 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; -} - \ No newline at end of file + [HDR] public Color color; +} \ No newline at end of file -- cgit v1.1-26-g67d0