From 0449b9f500d01bc40f35d8a36d0bb1edf0fd1379 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 13 Sep 2021 12:36:28 +0800 Subject: *misc --- Assets/Scripts/Unit/Events/EventEffect.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Assets/Scripts/Unit/Events') diff --git a/Assets/Scripts/Unit/Events/EventEffect.cs b/Assets/Scripts/Unit/Events/EventEffect.cs index 9798ed6a..347b92f5 100644 --- a/Assets/Scripts/Unit/Events/EventEffect.cs +++ b/Assets/Scripts/Unit/Events/EventEffect.cs @@ -2,6 +2,12 @@ public class EventEffect : AnimationEventBase { + public enum EAttachNode + { + Unit, + Bone, + } + public override TimelineEventProxy.EEventType type { get { return TimelineEventProxy.EEventType.EventEffect; } } public override string shortName { get { return "E"; } } @@ -9,9 +15,12 @@ public class EventEffect : AnimationEventBase public string effectPath; [Tooltip("Is attached to a bone")] - public bool attached; + public bool attached = true; + + [If("attached")] + public EAttachNode attachNode = EAttachNode.Unit; - [If("attached"), Tooltip("Bone path attach to")] + [When("attachNode", EAttachNode.Bone), Tooltip("Bone path attach to")] public string bone; [Tooltip("Position offset")] -- cgit v1.1-26-g67d0