summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRevan Ji <jiruifancr@gmail.com>2020-04-28 17:03:36 +0800
committerRevan Ji <jiruifancr@gmail.com>2020-04-29 00:26:37 +0800
commitf5029e18ca24e775621be7c3f2e38c47069ecc80 (patch)
tree172cf245d04beaae176398684fe7f0d722192993 /doc/classes
parent717f053e371f39b65ae1694901056580e1a8d6f9 (diff)
Add set_frame, pause, and oneshot to AnimatedTexture
Add API documentation for said changes.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/AnimatedTexture.xml9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml
index 80b910aaa7..ddd51cc6b3 100644
--- a/doc/classes/AnimatedTexture.xml
+++ b/doc/classes/AnimatedTexture.xml
@@ -61,6 +61,9 @@
</method>
</methods>
<members>
+ <member name="current_frame" type="int" setter="set_current_frame" getter="get_current_frame">
+ Sets the currently visible frame of the texture.
+ </member>
<member name="fps" type="float" setter="set_fps" getter="get_fps" default="4.0">
Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]).
For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds.
@@ -68,6 +71,12 @@
<member name="frames" type="int" setter="set_frames" getter="get_frames" default="1">
Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES].
</member>
+ <member name="oneshot" type="bool" setter="set_oneshot" getter="get_oneshot" default="false">
+ If [code]true[/code], the animation will only play once and will not loop back to the first frame after reaching the end. Note that reaching the end will not set [member pause] to [code]true[/code].
+ </member>
+ <member name="pause" type="bool" setter="set_pause" getter="get_pause" default="false">
+ If [code]true[/code], the animation will pause where it currently is (i.e. at [member current_frame]). The animation will continue from where it was paused when changing this property to [code]false[/code].
+ </member>
</members>
<constants>
<constant name="MAX_FRAMES" value="256">