diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-29 09:14:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 09:14:37 +0200 |
commit | dfe38fbf8a08f9cfff2729a3c4139e60a3cbd194 (patch) | |
tree | c891d295297ad4f3afd4d32ce60b5b3c48f2eadb /doc | |
parent | a17bdb10a938e21901fb65984f38debb01f03f7b (diff) | |
parent | f5029e18ca24e775621be7c3f2e38c47069ecc80 (diff) |
Merge pull request #38287 from JiRuifanCR/animatedtexture-oneshot-pause-set-frame
Add set_frame, pause, and oneshot to AnimatedTexture
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/AnimatedTexture.xml | 9 |
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"> |