mirror of
https://github.com/godotengine/godot.git
synced 2024-12-15 10:12:40 +08:00
83 lines
3.0 KiB
XML
83 lines
3.0 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="AnimationLibrary" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
|
<brief_description>
|
|
Container for [Animation] resources.
|
|
</brief_description>
|
|
<description>
|
|
An animation library stores a set of animations accessible through [StringName] keys, for use with [AnimationPlayer] nodes.
|
|
</description>
|
|
<tutorials>
|
|
<link title="Animation tutorial index">$DOCS_URL/tutorials/animation/index.html</link>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="add_animation">
|
|
<return type="int" enum="Error" />
|
|
<param index="0" name="name" type="StringName" />
|
|
<param index="1" name="animation" type="Animation" />
|
|
<description>
|
|
Adds the [param animation] to the library, accesible by the key [param name].
|
|
</description>
|
|
</method>
|
|
<method name="get_animation" qualifiers="const">
|
|
<return type="Animation" />
|
|
<param index="0" name="name" type="StringName" />
|
|
<description>
|
|
Returns the [Animation] with the key [param name]. If the animation does not exist, [code]null[/code] is returned and an error is logged.
|
|
</description>
|
|
</method>
|
|
<method name="get_animation_list" qualifiers="const">
|
|
<return type="StringName[]" />
|
|
<description>
|
|
Returns the keys for the [Animation]s stored in the library.
|
|
</description>
|
|
</method>
|
|
<method name="has_animation" qualifiers="const">
|
|
<return type="bool" />
|
|
<param index="0" name="name" type="StringName" />
|
|
<description>
|
|
Returns [code]true[/code] if the library stores an [Animation] with [param name] as the key.
|
|
</description>
|
|
</method>
|
|
<method name="remove_animation">
|
|
<return type="void" />
|
|
<param index="0" name="name" type="StringName" />
|
|
<description>
|
|
Removes the [Animation] with the key [param name].
|
|
</description>
|
|
</method>
|
|
<method name="rename_animation">
|
|
<return type="void" />
|
|
<param index="0" name="name" type="StringName" />
|
|
<param index="1" name="newname" type="StringName" />
|
|
<description>
|
|
Changes the key of the [Animation] associated with the key [param name] to [param newname].
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<members>
|
|
<member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{}">
|
|
</member>
|
|
</members>
|
|
<signals>
|
|
<signal name="animation_added">
|
|
<param index="0" name="name" type="StringName" />
|
|
<description>
|
|
Emitted when an [Animation] is added, under the key [param name].
|
|
</description>
|
|
</signal>
|
|
<signal name="animation_removed">
|
|
<param index="0" name="name" type="StringName" />
|
|
<description>
|
|
Emitted when an [Animation] stored with the key [param name] is removed.
|
|
</description>
|
|
</signal>
|
|
<signal name="animation_renamed">
|
|
<param index="0" name="name" type="StringName" />
|
|
<param index="1" name="to_name" type="StringName" />
|
|
<description>
|
|
Emitted when the key for an [Animation] is changed, from [param name] to [param to_name].
|
|
</description>
|
|
</signal>
|
|
</signals>
|
|
</class>
|