[DOCS] Update SpriteFrames class ref
This commit is contained in:
parent
a4fe784752
commit
06ce436144
1 changed files with 17 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue