/
AnimationNode.hx
202 lines (169 loc) · 8.73 KB
/
AnimationNode.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
// Automatically generated Godot externs: DO NOT EDIT
// MIT licensed, see LICENSE.md
package godot;
import cs.system.*;
/**
Base resource for `godot.AnimationTree` nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas.
Inherit this when creating nodes mainly for use in `godot.AnimationNodeBlendTree`, otherwise `godot.AnimationRootNode` should be used instead.
**/
@:libType
@:csNative
@:native("Godot.AnimationNode")
@:autoBuild(godot.Godot.buildUserClass())
extern class AnimationNode extends godot.Resource {
/**
`removed_from_graph` signal.
**/
public var onRemovedFromGraph(get, never):Signal<Void->Void>;
@:dox(hide) @:noCompletion inline function get_onRemovedFromGraph():Signal<Void->Void> {
return new Signal(this, "removed_from_graph", Signal.SignalHandlerVoidVoid.connectSignal, Signal.SignalHandlerVoidVoid.disconnectSignal, Signal.SignalHandlerVoidVoid.isSignalConnected);
}
/**
`tree_changed` signal.
**/
public var onTreeChanged(get, never):Signal<Void->Void>;
@:dox(hide) @:noCompletion inline function get_onTreeChanged():Signal<Void->Void> {
return new Signal(this, "tree_changed", Signal.SignalHandlerVoidVoid.connectSignal, Signal.SignalHandlerVoidVoid.disconnectSignal, Signal.SignalHandlerVoidVoid.isSignalConnected);
}
@:native("Filters")
public var filters:godot.collections.Array;
/**
If `true`, filtering is enabled.
**/
@:native("FilterEnabled")
public var filterEnabled:Bool;
@:native("new")
public function new():Void;
/**
Gets the text caption for this node (used by some editors).
**/
@:native("GetCaption")
public function getCaption():std.String;
/**
Gets a child node by index (used by editors inheriting from `godot.AnimationRootNode`).
**/
@:native("GetChildByName")
public function getChildByName(name:std.String):godot.Object;
/**
Gets all children nodes in order as a `name: node` dictionary. Only useful when inheriting `godot.AnimationRootNode`.
**/
@:native("GetChildNodes")
public function getChildNodes():godot.collections.Dictionary;
/**
Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
**/
@:native("GetParameterDefaultValue")
public function getParameterDefaultValue(name:std.String):Dynamic;
/**
Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to `godot.Object.getPropertyList`.
**/
@:native("GetParameterList")
public function getParameterList():godot.collections.Array;
/**
Returns `true` whether you want the blend tree editor to display filter editing on this node.
**/
@:native("HasFilter")
public function hasFilter():std.String;
/**
User-defined callback called when a custom node is processed. The `time` parameter is a relative delta, unless `seek` is `true`, in which case it is absolute.
Here, call the `godot.AnimationNode.blendInput`, `godot.AnimationNode.blendNode` or `godot.AnimationNode.blendAnimation` functions. You can also use `godot.AnimationNode.getParameter` and `godot.AnimationNode.setParameter` to modify local memory.
This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called).
**/
@:native("Process")
public function process(time:Single, seek:Bool):Void;
/**
Amount of inputs in this node, only useful for nodes that go into `godot.AnimationNodeBlendTree`.
**/
@:native("GetInputCount")
public function getInputCount():Int;
/**
Gets the name of an input by index.
**/
@:native("GetInputName")
public function getInputName(input:Int):std.String;
/**
Adds an input to the node. This is only useful for nodes created for use in an `godot.AnimationNodeBlendTree`.
**/
@:native("AddInput")
public function addInput(name:std.String):Void;
/**
Removes an input, call this only when inactive.
**/
@:native("RemoveInput")
public function removeInput(index:Int):Void;
/**
Adds or removes a path for the filter.
**/
@:native("SetFilterPath")
public function setFilterPath(path:godot.NodePath, enable:Bool):Void;
/**
Returns whether the given path is filtered.
**/
@:native("IsPathFiltered")
public function isPathFiltered(path:godot.NodePath):Bool;
@:native("SetFilterEnabled")
public function setFilterEnabled(enable:Bool):Void;
@:native("IsFilterEnabled")
public function isFilterEnabled():Bool;
/**
Blend an animation by `blend` amount (name must be valid in the linked `godot.AnimationPlayer`). A `time` and `delta` may be passed, as well as whether `seek` happened.
**/
@:native("BlendAnimation")
public function blendAnimation(animation:std.String, time:Single, delta:Single, seeked:Bool, blend:Single):Void;
#if doc_gen
/**
Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from `godot.AnimationRootNode` instead, else editors will not display your node for addition.
**/
@:native("BlendNode")
public function blendNode(name:std.String, node:godot.AnimationNode, time:Single, seek:Bool, blend:Single, ?filter:godot.AnimationNode_FilterAction, ?optimize:Bool):Single;
#else
/**
Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from `godot.AnimationRootNode` instead, else editors will not display your node for addition.
**/
@:native("BlendNode")
public overload function blendNode(name:std.String, node:godot.AnimationNode, time:Single, seek:Bool, blend:Single):Single;
/**
Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from `godot.AnimationRootNode` instead, else editors will not display your node for addition.
**/
@:native("BlendNode")
public overload function blendNode(name:std.String, node:godot.AnimationNode, time:Single, seek:Bool, blend:Single, filter:godot.AnimationNode_FilterAction):Single;
/**
Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from `godot.AnimationRootNode` instead, else editors will not display your node for addition.
**/
@:native("BlendNode")
public overload function blendNode(name:std.String, node:godot.AnimationNode, time:Single, seek:Bool, blend:Single, filter:godot.AnimationNode_FilterAction, optimize:Bool):Single;
#end
#if doc_gen
/**
Blend an input. This is only useful for nodes created for an `godot.AnimationNodeBlendTree`. The `time` parameter is a relative delta, unless `seek` is `true`, in which case it is absolute. A filter mode may be optionally passed (see `godot.AnimationNode_FilterAction` for options).
**/
@:native("BlendInput")
public function blendInput(inputIndex:Int, time:Single, seek:Bool, blend:Single, ?filter:godot.AnimationNode_FilterAction, ?optimize:Bool):Single;
#else
/**
Blend an input. This is only useful for nodes created for an `godot.AnimationNodeBlendTree`. The `time` parameter is a relative delta, unless `seek` is `true`, in which case it is absolute. A filter mode may be optionally passed (see `godot.AnimationNode_FilterAction` for options).
**/
@:native("BlendInput")
public overload function blendInput(inputIndex:Int, time:Single, seek:Bool, blend:Single):Single;
/**
Blend an input. This is only useful for nodes created for an `godot.AnimationNodeBlendTree`. The `time` parameter is a relative delta, unless `seek` is `true`, in which case it is absolute. A filter mode may be optionally passed (see `godot.AnimationNode_FilterAction` for options).
**/
@:native("BlendInput")
public overload function blendInput(inputIndex:Int, time:Single, seek:Bool, blend:Single, filter:godot.AnimationNode_FilterAction):Single;
/**
Blend an input. This is only useful for nodes created for an `godot.AnimationNodeBlendTree`. The `time` parameter is a relative delta, unless `seek` is `true`, in which case it is absolute. A filter mode may be optionally passed (see `godot.AnimationNode_FilterAction` for options).
**/
@:native("BlendInput")
public overload function blendInput(inputIndex:Int, time:Single, seek:Bool, blend:Single, filter:godot.AnimationNode_FilterAction, optimize:Bool):Single;
#end
/**
Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes.
**/
@:native("SetParameter")
public function setParameter(name:std.String, value:Dynamic):Void;
/**
Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
**/
@:native("GetParameter")
public function getParameter(name:std.String):Dynamic;
}