W3cubDocs

/Godot 3.1

AnimationNodeStateMachinePlayback

Inherits: Resource < Reference < Object

Category: Core

Brief Description

Playback control for AnimationNodeStateMachine.

Methods

String get_current_node ( ) const
PoolStringArray get_travel_path ( ) const
bool is_playing ( ) const
void start ( String node )
void stop ( )
void travel ( String to_node )

Description

Allows control of AnimationTree state machines created with AnimationNodeStateMachine. Retrieve with $AnimationTree.get("parameters/playback"). Example:

var state_machine = $AnimationTree.get("parameters/playback")
state_machine.travel("some_state")

Method Descriptions

String get_current_node ( ) const

Returns the currently playing animation state.

PoolStringArray get_travel_path ( ) const

bool is_playing ( ) const

Returns true if an animation is playing.

void start ( String node )

Starts playing the given animation.

void stop ( )

Stops the currently playing animation.

void travel ( String to_node )

Transitions from the current state to another one, following the shortest path.

© 2014–2019 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
http://docs.godotengine.org/en/3.1/classes/class_animationnodestatemachineplayback.html