AnimationNodeTransition
A transition within an AnimationTree
connecting two AnimationNode
s.
class AnimationNodeTransition
Simple state machine for cases which don’t require a more advanced AnimationNodeStateMachine
. Animations can be connected to the inputs and transition times can be specified.
After setting the request and changing the animation playback, the transition node automatically clears the request on the next process frame by setting its transition_request
value to empty.
Superclasses
class AnimationNodeSync
Base class for
AnimationNode
s with more than two input ports that must be synchronized.
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.
Type members
Instance members
var allowTransitionToSelf: Bool
If
true
, allows transition to the self state. When the reset option is enabled in input, the animation is restarted. Iffalse
, nothing happens on the transition to the self state.var inputCount: Int32
The number of enabled input ports for this animation node.
var xfadeCurve: Curve?
Determines how cross-fading between animations is eased. If empty, the transition will be linear.
var xfadeTime: Double
Cross-fading time (in seconds) between each animation connected to the inputs.
func isInputReset(input: Int32
) -> Bool Returns whether the animation restarts when the animation transitions from the other animation.
func isInputSetAsAutoAdvance(input: Int32
) -> Bool Returns
true
if auto-advance is enabled for the giveninput
index.func setInputAsAutoAdvance(input: Int32, enable: Bool
) Enables or disables auto-advance for the given
input
index. If enabled, state changes to the next input after playing the animation once. If enabled for the last input state, it loops to the first.func setInputReset(input: Int32, enable: Bool
) If
true
, the destination animation is restarted when the animation transitions.