summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoommetee Ketson <poommetee@protonmail.com>2017-09-25 19:24:02 +0700
committerGitHub <noreply@github.com>2017-09-25 19:24:02 +0700
commite9a89efcf822d260b033dcd02127c5874511d01a (patch)
tree2ac2e49e89529855816d75a3c758ef3577a996b7
parent0761efaf36fce5e4ae374d70c129074b4dd749c5 (diff)
parent06ce436144410fc0f8f117d2303b79acc4ac5335 (diff)
Merge pull request #11553 from cbscribe/kcc_spriteframes_doc
[DOCS] Update SpriteFrames class ref [ci skip]
-rw-r--r--doc/classes/SpriteFrames.xml18
1 files changed, 17 insertions, 1 deletions
diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml
index f4a8eeabe4..e46fdc80e0 100644
--- a/doc/classes/SpriteFrames.xml
+++ b/doc/classes/SpriteFrames.xml
@@ -4,7 +4,7 @@
Sprite frame library for AnimatedSprite.
</brief_description>
<description>
- Sprite frame library for [AnimatedSprite].
+ Sprite frame library for [AnimatedSprite]. Contains frames and animation data for playback.
</description>
<tutorials>
</tutorials>
@@ -17,6 +17,7 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ Adds a new animation to the the library.
</description>
</method>
<method name="add_frame">
@@ -29,6 +30,7 @@
<argument index="2" name="at_position" type="int" default="-1">
</argument>
<description>
+ Adds a frame to the given animation.
</description>
</method>
<method name="clear">
@@ -37,12 +39,14 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ Removes all frames from the given animation.
</description>
</method>
<method name="clear_all">
<return type="void">
</return>
<description>
+ Removes all animations. A "default" animation will be created.
</description>
</method>
<method name="get_animation_loop" qualifiers="const">
@@ -51,6 +55,7 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ If [code]true[/code] the given animation will loop.
</description>
</method>
<method name="get_animation_speed" qualifiers="const">
@@ -59,6 +64,7 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ The animation's speed in frames per second.
</description>
</method>
<method name="get_frame" qualifiers="const">
@@ -69,6 +75,7 @@
<argument index="1" name="idx" type="int">
</argument>
<description>
+ Returns the animation's selected frame.
</description>
</method>
<method name="get_frame_count" qualifiers="const">
@@ -77,6 +84,7 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ Returns the number of frames in the animation.
</description>
</method>
<method name="has_animation" qualifiers="const">
@@ -85,6 +93,7 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ If [code]true[/code] the named animation exists.
</description>
</method>
<method name="remove_animation">
@@ -93,6 +102,7 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ Removes the given animation.
</description>
</method>
<method name="remove_frame">
@@ -103,6 +113,7 @@
<argument index="1" name="idx" type="int">
</argument>
<description>
+ Removes the animation's selected frame.
</description>
</method>
<method name="rename_animation">
@@ -113,6 +124,7 @@
<argument index="1" name="newname" type="String">
</argument>
<description>
+ Changes the animation's name to [code]newname[/code].
</description>
</method>
<method name="set_animation_loop">
@@ -123,6 +135,7 @@
<argument index="1" name="loop" type="bool">
</argument>
<description>
+ If [code]true[/code] the animation will loop.
</description>
</method>
<method name="set_animation_speed">
@@ -133,6 +146,7 @@
<argument index="1" name="speed" type="float">
</argument>
<description>
+ The animation's speed in frames per second.
</description>
</method>
<method name="set_frame">
@@ -145,11 +159,13 @@
<argument index="2" name="txt" type="Texture">
</argument>
<description>
+ Sets the texture of the given frame.
</description>
</method>
</methods>
<members>
<member name="animations" type="Array" setter="_set_animations" getter="_get_animations">
+ An [Array] containing the [code]name[/code], [code]speed[/code], [code]loop[/code], and [code]frames[/code] of each animation.
</member>
<member name="frames" type="Array" setter="_set_frames" getter="_get_frames">
</member>