Improve docs for PlayAnimation & StopAnimation
This commit is contained in:
parent
047b75258b
commit
3d5cbbf50f
|
@ -4,9 +4,9 @@
|
||||||
BT action that waits for an animation to finish playing.
|
BT action that waits for an animation to finish playing.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
BTAwaitAnimation waits for an animation on the specified [AnimationPlayer] node to finish playing and returns [code]SUCCESS[/code].
|
BTAwaitAnimation action waits for an animation on the specified [AnimationPlayer] node to finish playing and returns [code]SUCCESS[/code].
|
||||||
Returns [code]SUCCESS[/code] if the specified animation has finished playing or if the specified animation is not currently playing.
|
Returns [code]SUCCESS[/code] if the specified animation has finished playing or if the specified animation is not currently playing.
|
||||||
Returns [code]FAILURE[/code] if the specified animation doesn't exist or if the action fails to get [AnimationPlayer] instance.
|
Returns [code]FAILURE[/code] if the specified animation doesn't exist or if the action fails to get the [AnimationPlayer] node.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
BTPauseAnimation action pauses the playback of an animation on the specified [AnimationPlayer] node and returns [code]SUCCESS[/code].
|
BTPauseAnimation action pauses the playback of an animation on the specified [AnimationPlayer] node and returns [code]SUCCESS[/code].
|
||||||
Returns [code]FAILURE[/code] if the action fails to acquire the [AnimationPlayer] node.
|
Returns [code]FAILURE[/code] if the action fails to get the [AnimationPlayer] node.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
BT action that plays an animation on the specified [AnimationPlayer] node.
|
BT action that plays an animation on the specified [AnimationPlayer] node.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
BTPlayAnimation action plays an animation on the specified [AnimationPlayer] node. If the [member await_completion] is greater than [code]0[/code], the action will wait for the animation to complete, with a maximum waiting time equal to [member await_completion].
|
BTPlayAnimation action plays an animation on the specified [AnimationPlayer] node. If the [member await_completion] is greater than [code]0[/code], the action will wait for the animation to complete, with the maximum waiting time equal to [member await_completion].
|
||||||
Returns [code]SUCCESS[/code] if the animation finishes playing or if the elapsed time exceeds [member await_completion]. When [member await_completion] is set to [code]0[/code], BTPlayAnimation doesn't wait for the animation to finish and immediately returns [code]SUCCESS[/code].
|
Returns [code]SUCCESS[/code] if the animation finishes playing or if the elapsed time exceeds [member await_completion]. When [member await_completion] is set to [code]0[/code], BTPlayAnimation doesn't wait for the animation to finish and immediately returns [code]SUCCESS[/code].
|
||||||
Returns [code]RUNNING[/code] if the animation is still playing and the elapsed time is less than [member await_completion].
|
Returns [code]RUNNING[/code] if the animation is still playing and the elapsed time is less than [member await_completion].
|
||||||
Returns [code]FAILURE[/code] if the action fails to play the requested animation.
|
Returns [code]FAILURE[/code] if the action fails to play the requested animation.
|
||||||
|
@ -13,22 +13,22 @@
|
||||||
</tutorials>
|
</tutorials>
|
||||||
<members>
|
<members>
|
||||||
<member name="animation_name" type="StringName" setter="set_animation_name" getter="get_animation_name" default="&""">
|
<member name="animation_name" type="StringName" setter="set_animation_name" getter="get_animation_name" default="&""">
|
||||||
Animation's key within the [AnimationPlayer] node. If empty, BTPlayAnimation will resume the last played animation if [AnimationPlayer] was paused.
|
Animation's key within the [AnimationPlayer] node. If empty, BTPlayAnimation will resume the last played animation if the [AnimationPlayer] was previously paused.
|
||||||
</member>
|
</member>
|
||||||
<member name="animation_player" type="BBNode" setter="set_animation_player" getter="get_animation_player">
|
<member name="animation_player" type="BBNode" setter="set_animation_player" getter="get_animation_player">
|
||||||
Parameter that specifies the [AnimationPlayer] node.
|
Parameter that specifies the [AnimationPlayer] node.
|
||||||
</member>
|
</member>
|
||||||
<member name="await_completion" type="float" setter="set_await_completion" getter="get_await_completion" default="0.0">
|
<member name="await_completion" type="float" setter="set_await_completion" getter="get_await_completion" default="0.0">
|
||||||
Duration to wait for the animation to finish (in seconds).
|
The maximum duration to wait for the animation to complete (in seconds). If the animation doesn't finish within this time, BTAwaitAnimation will return [code]FAILURE[/code]. If set to [code]0[/code], BTPlayAnimation doesn't wait for the animation to finish and immediately returns [code]SUCCESS[/code].
|
||||||
</member>
|
</member>
|
||||||
<member name="blend" type="float" setter="set_blend" getter="get_blend" default="-1.0">
|
<member name="blend" type="float" setter="set_blend" getter="get_blend" default="-1.0">
|
||||||
Custom blend time (in seconds).
|
Custom blend time (in seconds). See [method AnimationPlayer.play].
|
||||||
</member>
|
</member>
|
||||||
<member name="from_end" type="bool" setter="set_from_end" getter="get_from_end" default="false">
|
<member name="from_end" type="bool" setter="set_from_end" getter="get_from_end" default="false">
|
||||||
Play animation from the end. Used in combination with negative [member speed] to play animation in reverse.
|
Play animation from the end. Used in combination with negative [member speed] to play animation in reverse. See [method AnimationPlayer.play].
|
||||||
</member>
|
</member>
|
||||||
<member name="speed" type="float" setter="set_speed" getter="get_speed" default="1.0">
|
<member name="speed" type="float" setter="set_speed" getter="get_speed" default="1.0">
|
||||||
Custom playback speed scaling ratio.
|
Custom playback speed scaling ratio. See [method AnimationPlayer.play].
|
||||||
</member>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
</class>
|
</class>
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<class name="BTStopAnimation" inherits="BTAction" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
<class name="BTStopAnimation" inherits="BTAction" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
BT action that stops playback of an animation on the specified [AnimationPlayer] node.
|
BT action that stops the playback of an animation on the specified [AnimationPlayer] node.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
BTStopAnimation action stops playback of an animation on the specified [AnimationPlayer] node and returns [code]SUCCESS[/code]. If [member animation_name] is set, it will only stop playback if the specified animation is currently playing.
|
BTStopAnimation action stops the playback of an animation on the specified [AnimationPlayer] node and returns [code]SUCCESS[/code]. If [member animation_name] is set, it will only stop the playback if the specified animation is currently playing.
|
||||||
Returns [code]FAILURE[/code] if the action fails to acquire [AnimationPlayer] node.
|
Returns [code]FAILURE[/code] if the action fails to get the [AnimationPlayer] node.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
<members>
|
<members>
|
||||||
<member name="animation_name" type="StringName" setter="set_animation_name" getter="get_animation_name" default="&""">
|
<member name="animation_name" type="StringName" setter="set_animation_name" getter="get_animation_name" default="&""">
|
||||||
Animation's key within the [AnimationPlayer] node. If not empty, BTStopAnimation will only stop playback if the specified animation is currently playing.
|
Animation's key within the [AnimationPlayer] node. If not empty, BTStopAnimation will only stop the playback if the specified animation is currently playing.
|
||||||
</member>
|
</member>
|
||||||
<member name="animation_player" type="BBNode" setter="set_animation_player" getter="get_animation_player">
|
<member name="animation_player" type="BBNode" setter="set_animation_player" getter="get_animation_player">
|
||||||
Parameter that specifies the [AnimationPlayer] node.
|
Parameter that specifies the [AnimationPlayer] node.
|
||||||
|
|
Loading…
Reference in New Issue