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