From 1afdc600b340ee3c2e79abc1b59c3bfbb58046c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AF=7E?= Date: Tue, 10 May 2022 19:54:55 +0200 Subject: [PATCH] Add AacFlState.AutomaticallyMovesTo(AacFlStateMachine) for parity: - This brings parity with States, so that a state machine node can automatically move to another state. --- Framework/Editor/V0/AacFlStates.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Framework/Editor/V0/AacFlStates.cs b/Framework/Editor/V0/AacFlStates.cs index 77cd0e0..2c72826 100644 --- a/Framework/Editor/V0/AacFlStates.cs +++ b/Framework/Editor/V0/AacFlStates.cs @@ -344,6 +344,13 @@ namespace AnimatorAsCode.V0 return this; } + public AacFlState AutomaticallyMovesTo(AacFlStateMachine destination) + { + var transition = ConfigureTransition(State.AddTransition(destination.Machine)); + transition.hasExitTime = true; + return this; + } + public AacFlTransition Exits() { return new AacFlTransition(ConfigureTransition(State.AddExitTransition()), _machine, State, null);