Merge pull request #34128 from akien-mga/doc-animplayer-play-stop
doc: Fix and clarify AnimationPlayer play and stop descriptions
This commit is contained in:
commit
5f64d773ba
1 changed files with 7 additions and 8 deletions
|
@ -106,7 +106,7 @@
|
||||||
<return type="float">
|
<return type="float">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Gets the actual playing speed of current animation or 0 if not playing. This speed is the [code]playback_speed[/code] property multiplied by [code]custom_speed[/code] argument specified when calling the [code]play[/code] method.
|
Gets the actual playing speed of current animation or 0 if not playing. This speed is the [member playback_speed] property multiplied by [code]custom_speed[/code] argument specified when calling the [method play] method.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_queue">
|
<method name="get_queue">
|
||||||
|
@ -144,9 +144,9 @@
|
||||||
<argument index="3" name="from_end" type="bool" default="false">
|
<argument index="3" name="from_end" type="bool" default="false">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Plays the animation with key [code]name[/code]. Custom speed and blend times can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards.
|
Plays the animation with key [code]name[/code]. Custom blend times and speed can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]).
|
||||||
If the animation has been paused by [method stop], it will be resumed. Calling [method play] without arguments will also resume the animation.
|
The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [code]name[/code], or with no [code]name[/code] parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [method stop] for both pause and stop). If the animation was already playing, it will keep playing.
|
||||||
[b]Note:[/b] The animation will be updated the next time the AnimationPlayer is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call [code]advance(0)[/code].
|
[b]Note:[/b] The animation will be updated the next time the [AnimationPlayer] is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call [code]advance(0)[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="play_backwards">
|
<method name="play_backwards">
|
||||||
|
@ -158,8 +158,7 @@
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Plays the animation with key [code]name[/code] in reverse.
|
Plays the animation with key [code]name[/code] in reverse.
|
||||||
If the animation has been paused by [code]stop(true)[/code], it will be resumed backwards. Calling [code]play_backwards()[/code] without arguments will also resume the animation backwards.
|
This method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information.
|
||||||
[b]Note:[/b] This is the same as [code]play[/code] in regards to process/update behavior.
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="queue">
|
<method name="queue">
|
||||||
|
@ -222,8 +221,8 @@
|
||||||
<argument index="0" name="reset" type="bool" default="true">
|
<argument index="0" name="reset" type="bool" default="true">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Stops the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code].
|
Stops or pauses the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code].
|
||||||
If [code]reset[/code] is [code]false[/code], then calling [method play] without arguments or [code]play("same_as_before")[/code] will resume the animation. Works the same for the [method play_backwards].
|
If [code]reset[/code] is [code]false[/code], the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
|
Loading…
Reference in a new issue