summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-19 21:52:05 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-19 21:52:05 +0100
commita202f5104f378d1301e510d322e230f62dff078c (patch)
treeb14406644767aec8a6d21deb82b81251f27f8d83 /doc/classes
parent88cbd5d42266b57e9ca8a0727640082fb303cef3 (diff)
parent8bfaf098c7ab061d6363d3603c773cd9c48f17d7 (diff)
Merge pull request #71264 from TokageItLab/improve-statemachine
Add next/reset function to `AnimationStateMachine`
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/AnimationNodeStateMachinePlayback.xml11
-rw-r--r--doc/classes/AnimationNodeStateMachineTransition.xml3
-rw-r--r--doc/classes/AnimationNodeTransition.xml2
3 files changed, 15 insertions, 1 deletions
diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml
index 8f53ef0dcf..7e01be12c4 100644
--- a/doc/classes/AnimationNodeStateMachinePlayback.xml
+++ b/doc/classes/AnimationNodeStateMachinePlayback.xml
@@ -50,11 +50,19 @@
Returns [code]true[/code] if an animation is playing.
</description>
</method>
+ <method name="next">
+ <return type="void" />
+ <description>
+ If there is a next path by travel or auto advance, immediately transitions from the current state to the next state.
+ </description>
+ </method>
<method name="start">
<return type="void" />
<param index="0" name="node" type="StringName" />
+ <param index="1" name="reset" type="bool" default="true" />
<description>
Starts playing the given animation.
+ If [param reset] is [code]true[/code], the animation is played from the beginning.
</description>
</method>
<method name="stop">
@@ -66,8 +74,11 @@
<method name="travel">
<return type="void" />
<param index="0" name="to_node" type="StringName" />
+ <param index="1" name="reset_on_teleport" type="bool" default="true" />
<description>
Transitions from the current state to another one, following the shortest path.
+ If the path does not connect from the current state, the animation will play after the state teleports.
+ If [param reset_on_teleport] is [code]true[/code], the animation is played from the beginning when the travel cause a teleportation.
</description>
</method>
</methods>
diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml
index 814b2d0052..eee25fad7c 100644
--- a/doc/classes/AnimationNodeStateMachineTransition.xml
+++ b/doc/classes/AnimationNodeStateMachineTransition.xml
@@ -28,6 +28,9 @@
<member name="priority" type="int" setter="set_priority" getter="get_priority" default="1">
Lower priority transitions are preferred when travelling through the tree via [method AnimationNodeStateMachinePlayback.travel] or [member advance_mode] is set to [constant ADVANCE_MODE_AUTO].
</member>
+ <member name="reset" type="bool" setter="set_reset" getter="is_reset" default="true">
+ If [code]true[/code], the destination animation is played back from the beginning when switched.
+ </member>
<member name="switch_mode" type="int" setter="set_switch_mode" getter="get_switch_mode" enum="AnimationNodeStateMachineTransition.SwitchMode" default="0">
The transition type.
</member>
diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml
index f6e2fc5eb2..cd5e45fbdf 100644
--- a/doc/classes/AnimationNodeTransition.xml
+++ b/doc/classes/AnimationNodeTransition.xml
@@ -43,7 +43,7 @@
<member name="enabled_inputs" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs" default="0">
The number of enabled input ports for this node.
</member>
- <member name="from_start" type="bool" setter="set_from_start" getter="is_from_start" default="true">
+ <member name="reset" type="bool" setter="set_reset" getter="is_reset" default="true">
If [code]true[/code], the destination animation is played back from the beginning when switched.
</member>
<member name="xfade_curve" type="Curve" setter="set_xfade_curve" getter="get_xfade_curve">