mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Code refactor
This commit is contained in:
parent
757badf4f6
commit
a55ba7b95b
232 changed files with 1282 additions and 936 deletions
|
@ -18,8 +18,12 @@ namespace RimWorldAnimationStudio
|
|||
public class PawnKeyframeEvent : UnityEvent<PawnKeyframe> { }
|
||||
public class ActorAddonEvent : UnityEvent<ActorAddon> { }
|
||||
public class AddonKeyframeEvent : UnityEvent<AddonKeyframe> { }
|
||||
public class ActorBodyEvent : UnityEvent<ActorBody> { }
|
||||
public class ActorBodyPartEvent : UnityEvent<ActorBodyPart> { }
|
||||
|
||||
// Event list
|
||||
public static UnityEvent onAnimationToggled = new UnityEvent();
|
||||
public static UnityEvent onAnimationChanged = new UnityEvent();
|
||||
public static UnityEvent onAnimationDefChanged = new UnityEvent();
|
||||
public static WorkspaceIntEvent onActorIDChanged = new WorkspaceIntEvent();
|
||||
public static WorkspaceIntEvent onStageIDChanged = new WorkspaceIntEvent();
|
||||
|
@ -29,13 +33,18 @@ namespace RimWorldAnimationStudio
|
|||
public static WorkspaceIntEvent onKeyframeCountChanged = new WorkspaceIntEvent();
|
||||
public static ActorEvent onActorChanged = new ActorEvent();
|
||||
public static AnimationStageEvent onAnimationStageChanged = new AnimationStageEvent();
|
||||
public static AnimationStageEvent onStageWindowSizeChanged = new AnimationStageEvent();
|
||||
public static PawnAnimationClipEvent onPawnAnimationClipChanged = new PawnAnimationClipEvent();
|
||||
public static PawnKeyframeEvent onPawnKeyframeChanged = new PawnKeyframeEvent();
|
||||
public static ActorAddonEvent onActorAddonChanged = new ActorAddonEvent();
|
||||
public static AddonKeyframeEvent onAddonKeyframeChanged = new AddonKeyframeEvent();
|
||||
public static UnityEvent onDefNamesChanged = new UnityEvent();
|
||||
public static ActorBodyEvent onActorBodySelected = new ActorBodyEvent();
|
||||
public static ActorBodyPartEvent onActorBodyPartSelected = new ActorBodyPartEvent();
|
||||
|
||||
// Event invoking
|
||||
public static void OnAnimationToggled() { onAnimationToggled.Invoke(); }
|
||||
public static void OnAnimationChanged() { onAnimationChanged.Invoke(); }
|
||||
public static void OnAnimationDefChanged() { onAnimationDefChanged.Invoke(); }
|
||||
public static void OnActorIDChanged() { onActorIDChanged.Invoke(Workspace.ActorID); }
|
||||
public static void OnStageIDChanged() { onStageIDChanged.Invoke(Workspace.ActorID); }
|
||||
|
@ -45,10 +54,13 @@ namespace RimWorldAnimationStudio
|
|||
public static void OnKeyframeCountChanged(PawnAnimationClip clip) { onKeyframeCountChanged.Invoke(clip.Keyframes.Count); }
|
||||
public static void OnActorChanged(Actor actor) { onActorChanged.Invoke(actor); }
|
||||
public static void OnAnimationStageChanged(AnimationStage stage) { onAnimationStageChanged.Invoke(stage); }
|
||||
public static void OnStageWindowSizeChanged(AnimationStage stage) { onStageWindowSizeChanged.Invoke(stage); }
|
||||
public static void OnPawnAnimationClipChanged(PawnAnimationClip clip) { onPawnAnimationClipChanged.Invoke(clip); }
|
||||
public static void OnPawnKeyframeChanged(PawnKeyframe keyframe) { onPawnKeyframeChanged.Invoke(keyframe); }
|
||||
public static void OnActorAddonChanged(ActorAddon actorAddon) { onActorAddonChanged.Invoke(actorAddon); }
|
||||
public static void OnAddonKeyframeChanged(AddonKeyframe addonKeyframe) { onAddonKeyframeChanged.Invoke(addonKeyframe); }
|
||||
public static void OnDefNamesChanged() { onDefNamesChanged.Invoke(); }
|
||||
public static void OnActorBodySelected(ActorBody actorBody) { onActorBodySelected.Invoke(actorBody); }
|
||||
public static void OnActorBodyPartSelected(ActorBodyPart bodyPart) { onActorBodyPartSelected.Invoke(bodyPart); }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue