584288a32c
The API docs for various animation nodes are pretty empty, yet the tutorial at https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html contains some details. These details should be included in the API docs so looking up a particular class actually provides some information rather than requiring the user to hunt for a different tutorial. This also links the AnimationTree tutorial and demo in the docs. I've found the TPS demo to be the best resource so far for learning how to use the AnimationTree. This should be easy to find if someone looks up the AnimationTree API docs. Finally, this fixes a param typo in AnimationNodeStateMachine.
204 lines
5.2 KiB
XML
204 lines
5.2 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="AnimationNodeStateMachine" inherits="AnimationRootNode" category="Core" version="3.2">
|
|
<brief_description>
|
|
</brief_description>
|
|
<description>
|
|
Contains multiple root nodes as children in a graph. Each node is used as a state, and provides multiple functions to alternate between states. Retrieve the AnimationNodeStateMachinePlayback object from the [AnimationTree] node to control it programatically.
|
|
[codeblock]
|
|
var state_machine = anim_tree["parameters/StateMachine/playback"]
|
|
state_machine.travel("SomeState")
|
|
[codeblock]
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<demos>
|
|
</demos>
|
|
<methods>
|
|
<method name="add_node">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="name" type="String">
|
|
</argument>
|
|
<argument index="1" name="node" type="AnimationNode">
|
|
</argument>
|
|
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="add_transition">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="from" type="String">
|
|
</argument>
|
|
<argument index="1" name="to" type="String">
|
|
</argument>
|
|
<argument index="2" name="transition" type="AnimationNodeStateMachineTransition">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_end_node" qualifiers="const">
|
|
<return type="String">
|
|
</return>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_graph_offset" qualifiers="const">
|
|
<return type="Vector2">
|
|
</return>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_node" qualifiers="const">
|
|
<return type="AnimationNode">
|
|
</return>
|
|
<argument index="0" name="name" type="String">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_node_name" qualifiers="const">
|
|
<return type="String">
|
|
</return>
|
|
<argument index="0" name="node" type="AnimationNode">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_node_position" qualifiers="const">
|
|
<return type="Vector2">
|
|
</return>
|
|
<argument index="0" name="name" type="String">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_start_node" qualifiers="const">
|
|
<return type="String">
|
|
</return>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_transition" qualifiers="const">
|
|
<return type="AnimationNodeStateMachineTransition">
|
|
</return>
|
|
<argument index="0" name="idx" type="int">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_transition_count" qualifiers="const">
|
|
<return type="int">
|
|
</return>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_transition_from" qualifiers="const">
|
|
<return type="String">
|
|
</return>
|
|
<argument index="0" name="idx" type="int">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_transition_to" qualifiers="const">
|
|
<return type="String">
|
|
</return>
|
|
<argument index="0" name="idx" type="int">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="has_node" qualifiers="const">
|
|
<return type="bool">
|
|
</return>
|
|
<argument index="0" name="name" type="String">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="has_transition" qualifiers="const">
|
|
<return type="bool">
|
|
</return>
|
|
<argument index="0" name="from" type="String">
|
|
</argument>
|
|
<argument index="1" name="to" type="String">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="remove_node">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="name" type="String">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="remove_transition">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="from" type="String">
|
|
</argument>
|
|
<argument index="1" name="to" type="String">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="remove_transition_by_index">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="idx" type="int">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="rename_node">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="name" type="String">
|
|
</argument>
|
|
<argument index="1" name="new_name" type="String">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="set_end_node">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="name" type="String">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="set_graph_offset">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="offset" type="Vector2">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="set_node_position">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="name" type="String">
|
|
</argument>
|
|
<argument index="1" name="position" type="Vector2">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="set_start_node">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="name" type="String">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<constants>
|
|
</constants>
|
|
</class>
|