Add AacFlState.AutomaticallyMovesTo(AacFlStateMachine) for parity:

- This brings parity with States, so that a state machine node can automatically move to another state.
This commit is contained in:
Haï~
2022-05-10 20:06:47 +02:00
parent 928f4dfe79
commit 1afdc600b3
+7
View File
@@ -344,6 +344,13 @@ namespace AnimatorAsCode.V0
return this; return this;
} }
public AacFlState AutomaticallyMovesTo(AacFlStateMachine destination)
{
var transition = ConfigureTransition(State.AddTransition(destination.Machine));
transition.hasExitTime = true;
return this;
}
public AacFlTransition Exits() public AacFlTransition Exits()
{ {
return new AacFlTransition(ConfigureTransition(State.AddExitTransition()), _machine, State, null); return new AacFlTransition(ConfigureTransition(State.AddExitTransition()), _machine, State, null);