AnimationNodeStateMachineTransition
A transition within an AnimationNodeStateMachine
connecting two AnimationRootNode
s.
class AnimationNodeStateMachineTransition
The path generated when using travel(toNode:resetOnTeleport:)
is limited to the nodes connected by AnimationNodeStateMachineTransition
.
You can set the timing and conditions of the transition in detail.
This object emits the following signals:
Superclasses
class Resource
Base class for serializable objects.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
Type members
Instance members
var advanceCondition: StringName
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, iftreeRoot
is anAnimationNodeStateMachine
andadvanceCondition
is set to"idle"
:var advanceConditionChanged: SimpleSignal
Emitted when
advanceCondition
is changed.var advanceExpression: String
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.
var advanceMode: AnimationNodeStateMachineTransition.AdvanceMode
Determines whether the transition should disabled, enabled when using
travel(toNode:resetOnTeleport:)
, or traversed automatically if theadvanceCondition
andadvanceExpression
checks are true (if assigned).var priority: Int32
Lower priority transitions are preferred when travelling through the tree via
travel(toNode:resetOnTeleport:)
oradvanceMode
is set to .auto.var reset: Bool
If
true
, the destination animation is played back from the beginning when switched.var switchMode: AnimationNodeStateMachineTransition.SwitchMode
The transition type.
var xfadeCurve: Curve?
Ease curve for better control over cross-fade between this state and the next.
var xfadeTime: Double
The time to cross-fade between this state and the next.