[DOCS] Update SpriteFrames class ref

This commit is contained in:
Chris Bradfield 2017-09-24 11:37:28 -07:00
parent a4fe784752
commit 06ce436144

View file

@ -4,7 +4,7 @@
Sprite frame library for AnimatedSprite. Sprite frame library for AnimatedSprite.
</brief_description> </brief_description>
<description> <description>
Sprite frame library for [AnimatedSprite]. Sprite frame library for [AnimatedSprite]. Contains frames and animation data for playback.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@ -17,6 +17,7 @@
<argument index="0" name="anim" type="String"> <argument index="0" name="anim" type="String">
</argument> </argument>
<description> <description>
Adds a new animation to the the library.
</description> </description>
</method> </method>
<method name="add_frame"> <method name="add_frame">
@ -29,6 +30,7 @@
<argument index="2" name="at_position" type="int" default="-1"> <argument index="2" name="at_position" type="int" default="-1">
</argument> </argument>
<description> <description>
Adds a frame to the given animation.
</description> </description>
</method> </method>
<method name="clear"> <method name="clear">
@ -37,12 +39,14 @@
<argument index="0" name="anim" type="String"> <argument index="0" name="anim" type="String">
</argument> </argument>
<description> <description>
Removes all frames from the given animation.
</description> </description>
</method> </method>
<method name="clear_all"> <method name="clear_all">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Removes all animations. A "default" animation will be created.
</description> </description>
</method> </method>
<method name="get_animation_loop" qualifiers="const"> <method name="get_animation_loop" qualifiers="const">
@ -51,6 +55,7 @@
<argument index="0" name="anim" type="String"> <argument index="0" name="anim" type="String">
</argument> </argument>
<description> <description>
If [code]true[/code] the given animation will loop.
</description> </description>
</method> </method>
<method name="get_animation_speed" qualifiers="const"> <method name="get_animation_speed" qualifiers="const">
@ -59,6 +64,7 @@
<argument index="0" name="anim" type="String"> <argument index="0" name="anim" type="String">
</argument> </argument>
<description> <description>
The animation's speed in frames per second.
</description> </description>
</method> </method>
<method name="get_frame" qualifiers="const"> <method name="get_frame" qualifiers="const">
@ -69,6 +75,7 @@
<argument index="1" name="idx" type="int"> <argument index="1" name="idx" type="int">
</argument> </argument>
<description> <description>
Returns the animation's selected frame.
</description> </description>
</method> </method>
<method name="get_frame_count" qualifiers="const"> <method name="get_frame_count" qualifiers="const">
@ -77,6 +84,7 @@
<argument index="0" name="anim" type="String"> <argument index="0" name="anim" type="String">
</argument> </argument>
<description> <description>
Returns the number of frames in the animation.
</description> </description>
</method> </method>
<method name="has_animation" qualifiers="const"> <method name="has_animation" qualifiers="const">
@ -85,6 +93,7 @@
<argument index="0" name="anim" type="String"> <argument index="0" name="anim" type="String">
</argument> </argument>
<description> <description>
If [code]true[/code] the named animation exists.
</description> </description>
</method> </method>
<method name="remove_animation"> <method name="remove_animation">
@ -93,6 +102,7 @@
<argument index="0" name="anim" type="String"> <argument index="0" name="anim" type="String">
</argument> </argument>
<description> <description>
Removes the given animation.
</description> </description>
</method> </method>
<method name="remove_frame"> <method name="remove_frame">
@ -103,6 +113,7 @@
<argument index="1" name="idx" type="int"> <argument index="1" name="idx" type="int">
</argument> </argument>
<description> <description>
Removes the animation's selected frame.
</description> </description>
</method> </method>
<method name="rename_animation"> <method name="rename_animation">
@ -113,6 +124,7 @@
<argument index="1" name="newname" type="String"> <argument index="1" name="newname" type="String">
</argument> </argument>
<description> <description>
Changes the animation's name to [code]newname[/code].
</description> </description>
</method> </method>
<method name="set_animation_loop"> <method name="set_animation_loop">
@ -123,6 +135,7 @@
<argument index="1" name="loop" type="bool"> <argument index="1" name="loop" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code] the animation will loop.
</description> </description>
</method> </method>
<method name="set_animation_speed"> <method name="set_animation_speed">
@ -133,6 +146,7 @@
<argument index="1" name="speed" type="float"> <argument index="1" name="speed" type="float">
</argument> </argument>
<description> <description>
The animation's speed in frames per second.
</description> </description>
</method> </method>
<method name="set_frame"> <method name="set_frame">
@ -145,11 +159,13 @@
<argument index="2" name="txt" type="Texture"> <argument index="2" name="txt" type="Texture">
</argument> </argument>
<description> <description>
Sets the texture of the given frame.
</description> </description>
</method> </method>
</methods> </methods>
<members> <members>
<member name="animations" type="Array" setter="_set_animations" getter="_get_animations"> <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>
<member name="frames" type="Array" setter="_set_frames" getter="_get_frames"> <member name="frames" type="Array" setter="_set_frames" getter="_get_frames">
</member> </member>