0.2.0-dev Download ZIP
38 lines ·2.8 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="AnimationNodeExtension" inherits="AnimationNode" api_type="core" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | Base class for extending [AnimationRootNode]s from GDScript, C#, or C++. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | [AnimationNodeExtension] exposes the APIs of [AnimationRootNode] to allow users to extend it from GDScript, C#, or C++. This class is not meant to be used directly, but to be extended by other classes. It is used to create custom nodes for the [AnimationTree] system. |
| 8 | </description> |
| 9 | <tutorials> |
| 10 | </tutorials> |
| 11 | <methods> |
| 12 | <method name="_process_animation_node" qualifiers="virtual required"> |
| 13 | <return type="PackedFloat32Array" /> |
| 14 | <param index="0" name="playback_info" type="PackedFloat64Array" /> |
| 15 | <param index="1" name="test_only" type="bool" /> |
| 16 | <description> |
| 17 | A version of the [method AnimationNode._process] method that is meant to be overridden by custom nodes. It returns a [PackedFloat32Array] with the processed animation data. |
| 18 | The [PackedFloat64Array] parameter contains the playback information, containing the following values encoded as floating point numbers (in order): playback time and delta, start and end times, whether a seek was requested (encoded as a float greater than [code]0[/code]), whether the seek request was externally requested (encoded as a float greater than [code]0[/code]), the current [enum Animation.LoopedFlag] (encoded as a float), and the current blend weight. |
| 19 | The function must return a [PackedFloat32Array] of the node's time info, containing the following values (in order): animation length, time position, delta, [enum Animation.LoopMode] (encoded as a float), whether the animation is about to end (encoded as a float greater than [code]0[/code]) and whether the animation is infinite (encoded as a float greater than [code]0[/code]). All values must be included in the returned array. |
| 20 | </description> |
| 21 | </method> |
| 22 | <method name="get_remaining_time" qualifiers="static"> |
| 23 | <return type="float" /> |
| 24 | <param index="0" name="node_info" type="PackedFloat32Array" /> |
| 25 | <param index="1" name="break_loop" type="bool" /> |
| 26 | <description> |
| 27 | Returns the animation's remaining time for the given node info. For looping animations, it will only return the remaining time if [param break_loop] is [code]true[/code], a large integer value will be returned otherwise. |
| 28 | </description> |
| 29 | </method> |
| 30 | <method name="is_looping" qualifiers="static"> |
| 31 | <return type="bool" /> |
| 32 | <param index="0" name="node_info" type="PackedFloat32Array" /> |
| 33 | <description> |
| 34 | Returns [code]true[/code] if the animation for the given [param node_info] is looping. |
| 35 | </description> |
| 36 | </method> |
| 37 | </methods> |
| 38 | </class> |