Class AnimationNodeStateMachineTransition
- Namespace
- Godot
- Assembly
- GodotSharp.dll
The path generated when using Travel(StringName, bool) is limited to the nodes connected by AnimationNodeStateMachineTransition.
You can set the timing and conditions of the transition in detail.
public class AnimationNodeStateMachineTransition : Resource, IDisposable
- Inheritance
-
AnimationNodeStateMachineTransition
- Implements
- Inherited Members
Constructors
AnimationNodeStateMachineTransition()
public AnimationNodeStateMachineTransition()
Properties
AdvanceCondition
Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the AnimationTree that can be controlled from code (see Using AnimationTree). For example, if TreeRoot is an AnimationNodeStateMachine and AdvanceCondition is set to "idle"
:
GetNode<AnimationTree>("animation_tree").Set("parameters/conditions/idle", IsOnFloor && (LinearVelocity.X == 0));
public StringName AdvanceCondition { get; set; }
Property Value
AdvanceExpression
Use an expression as a condition for state machine transitions. It is possible to create complex animation advance conditions for switching between states and gives much greater flexibility for creating complex state machines by directly interfacing with the script code.
public string AdvanceExpression { get; set; }
Property Value
AdvanceMode
Determines whether the transition should disabled, enabled when using Travel(StringName, bool), or traversed automatically if the AdvanceCondition and AdvanceExpression checks are true (if assigned).
public AnimationNodeStateMachineTransition.AdvanceModeEnum AdvanceMode { get; set; }
Property Value
Priority
Lower priority transitions are preferred when travelling through the tree via Travel(StringName, bool) or AdvanceMode is set to Auto.
public int Priority { get; set; }
Property Value
Reset
If true
, the destination animation is played back from the beginning when switched.
public bool Reset { get; set; }
Property Value
SwitchMode
The transition type.
public AnimationNodeStateMachineTransition.SwitchModeEnum SwitchMode { get; set; }
Property Value
XfadeCurve
Ease curve for better control over cross-fade between this state and the next.
public Curve XfadeCurve { get; set; }
Property Value
XfadeTime
The time to cross-fade between this state and the next.
public float XfadeTime { get; set; }
Property Value
Methods
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
Events
AdvanceConditionChanged
Emitted when AdvanceCondition is changed.
public event Action AdvanceConditionChanged