/
AnimationNodeStateMachinePlayback.hx
72 lines (58 loc) · 1.71 KB
/
AnimationNodeStateMachinePlayback.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Automatically generated Godot externs: DO NOT EDIT
// MIT licensed, see LICENSE.md
package godot;
import cs.system.*;
/**
Allows control of `godot.AnimationTree` state machines created with `godot.AnimationNodeStateMachine`. Retrieve with `$AnimationTree.get("parameters/playback")`.
Example:
```
var state_machine = $AnimationTree.get("parameters/playback")
state_machine.travel("some_state")
```
**/
@:libType
@:csNative
@:native("Godot.AnimationNodeStateMachinePlayback")
@:autoBuild(godot.Godot.buildUserClass())
extern class AnimationNodeStateMachinePlayback extends godot.Resource {
@:native("new")
public function new():Void;
/**
Transitions from the current state to another one, following the shortest path.
**/
@:native("Travel")
public function travel(toNode:std.String):Void;
/**
Starts playing the given animation.
**/
@:native("Start")
public function start(node:std.String):Void;
/**
Stops the currently playing animation.
**/
@:native("Stop")
public function stop():Void;
/**
Returns `true` if an animation is playing.
**/
@:native("IsPlaying")
public function isPlaying():Bool;
/**
Returns the currently playing animation state.
**/
@:native("GetCurrentNode")
public function getCurrentNode():std.String;
/**
Returns the playback position within the current animation state.
**/
@:native("GetCurrentPlayPosition")
public function getCurrentPlayPosition():Single;
@:native("GetCurrentLength")
public function getCurrentLength():Single;
/**
Returns the current travel path as computed internally by the A* algorithm.
**/
public extern inline function getTravelPath():std.Array<std.String> {
return cs.Lib.array(cs.Syntax.code("{0}.GetTravelPath()", this));
}
}