AnimationNodeStateMachinePlayback
Inherits: Resource < Reference < Object
Playback control for AnimationNodeStateMachine.
AnimationNodeStateMachine的回放控制。
Description
Allows control of AnimationTree state machines created with AnimationNodeStateMachine. Retrieve with $AnimationTree.get("parameters/playback")
.
允许控制使用AnimationNodeStateMachine创建的AnimationTree状态机。 用$ AnimationTree.get(“ parameters / playback”)检索。
Example:
var state_machine = $AnimationTree.get("parameters/playback")
state_machine.travel("some_state")
Tutorials
Properties
bool | resource_local_to_scene | O: true |
Methods
StringName | get_current_node ( ) const |
PackedStringArray | get_travel_path ( ) const |
bool | is_playing ( ) const |
void | start ( StringName node ) |
void | stop ( ) |
void | travel ( StringName to_node ) |
Method Descriptions
- StringName get_current_node ( ) const
Returns the currently playing animation state.
返回当前正在播放的动画状态。
- PackedStringArray get_travel_path ( ) const
Returns the current travel path as computed internally by the A* algorithm.
返回由A *算法内部计算的当前行进路径。
- bool is_playing ( ) const
Returns true
if an animation is playing.
如果正在播放动画,则返回true。
- void start ( StringName node )
Starts playing the given animation.
开始播放给定的动画。
- void stop ( )
Stops the currently playing animation.
停止当前正在播放的动画。
- void travel ( StringName to_node )
Transitions from the current state to another one, following the shortest path.
从当前状态转换到另一个状态,遵循最短路径。