AnimationNodeStateMachinePlayback¶
Inherits: Resource < Reference < Object
AnimationNodeStateMachine的播放控件。
描述¶
允许控制用AnimationNodeStateMachine创建的AnimationTree状态机。用$AnimationTree.get("parameters/playback")
检索。
示例:
var state_machine = $AnimationTree.get("parameters/playback")
state_machine.travel("some_state")
教程¶
属性¶
resource_local_to_scene |
|
方法¶
get_current_length ( ) const |
|
get_current_node ( ) const |
|
get_current_play_position ( ) const |
|
get_travel_path ( ) const |
|
is_playing ( ) const |
|
void |
|
void |
stop ( ) |
void |
方法说明¶
float get_current_length ( ) const
String get_current_node ( ) const
返回当前播放的动画状态。
float get_current_play_position ( ) const
返回当前动画状态内的播放位置。
PoolStringArray get_travel_path ( ) const
返回A*算法内部计算的当前行进路径。
bool is_playing ( ) const
如果正在播放动画,返回true
。
void start ( String node )
开始播放指定的动画。
void stop ( )
停止当前播放的动画。
void travel ( String to_node )
按照最短路径从当前状态过渡到另一个状态。