AnimationNodeStateMachinePlayback
Provides playback control for an AnimationNodeStateMachine
.
class AnimationNodeStateMachinePlayback
Allows control of AnimationTree
state machines created with AnimationNodeStateMachine
. Retrieve with $AnimationTree.get("parameters/playback")
.
Example:
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.
Type members
Instance members
func getCurrentLength(
) -> Double Returns the current state length.
func getCurrentNode(
) -> StringName Returns the currently playing animation state.
func getCurrentPlayPosition(
) -> Double Returns the playback position within the current animation state.
func getFadingFromNode(
) -> StringName Returns the starting state of currently fading animation.
func getTravelPath(
) -> VariantCollection<StringName> Returns the current travel path as computed internally by the A* algorithm.
func isPlaying(
) -> Bool Returns
true
if an animation is playing.func next(
) If there is a next path by travel or auto advance, immediately transitions from the current state to the next state.
func start(node: StringName, reset: Bool
) Starts playing the given animation.
func stop(
) Stops the currently playing animation.
func travel(toNode: StringName, resetOnTeleport: Bool
) Transitions from the current state to another one, following the shortest path.