summaryrefslogtreecommitdiff
path: root/doc/classes/AnimatedTexture.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/AnimatedTexture.xml')
-rw-r--r--doc/classes/AnimatedTexture.xml13
1 files changed, 6 insertions, 7 deletions
diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml
index d4c25049d2..b851c76e59 100644
--- a/doc/classes/AnimatedTexture.xml
+++ b/doc/classes/AnimatedTexture.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimatedTexture" inherits="Texture" version="4.0">
+<class name="AnimatedTexture" inherits="Texture2D" version="4.0">
<brief_description>
Proxy texture for simple frame-based animations.
</brief_description>
<description>
- [AnimatedTexture] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite], it isn't a [Node], but has the advantage of being usable anywhere a [Texture] resource can be used, e.g. in a [TileSet].
+ [AnimatedTexture] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite], it isn't a [Node], but has the advantage of being usable anywhere a [Texture2D] resource can be used, e.g. in a [TileSet].
The playback of the animation is controlled by the [member fps] property as well as each frame's optional delay (see [method set_frame_delay]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame.
[AnimatedTexture] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. Also, it doesn't support [AtlasTexture]. Each frame needs to be separate image.
</description>
@@ -21,12 +21,12 @@
</description>
</method>
<method name="get_frame_texture" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="frame" type="int">
</argument>
<description>
- Returns the given frame's [Texture].
+ Returns the given frame's [Texture2D].
</description>
</method>
<method name="set_frame_delay">
@@ -52,16 +52,15 @@
</return>
<argument index="0" name="frame" type="int">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<description>
- Assigns a [Texture] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1.
+ Assigns a [Texture2D] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1.
You can define any number of textures up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation.
</description>
</method>
</methods>
<members>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
<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.