AnimationLibrary
继承: Resource
< RefCounted
< Object
Container for Animation
resources.
描述
An animation library stores a set of animations accessible through StringName
keys, for use with AnimationPlayer
nodes.
方法
Error | add_animation ( name: StringName , animation: Animation ) |
Animation | get_animation ( name: StringName ) const1 |
Array StringName | get_animation_list ( ) const1 |
bool | has_animation ( name: StringName ) const1 |
void | remove_animation ( name: StringName ) |
void | rename_animation ( name: StringName , newname: StringName ) |
信号
animation_added ( name: StringName
)
Emitted when an Animation
is added, under the key name
.
animation_changed ( name: StringName
)
Emitted when there's a change in one of the animations, e.g. tracks are added, moved or have changed paths. name
is the key of the animation that was changed.
See also Resource.changed
, which this acts as a relay for.
animation_removed ( name: StringName
)
Emitted when an Animation
stored with the key name
is removed.
animation_renamed ( name: StringName
, to_name: StringName
)
Emitted when the key for an Animation
is changed, from name
to to_name
.
方法说明
Error add_animation ( name: StringName
, animation: Animation
)
Adds the animation
to the library, accessible by the key name
.
Animation
get_animation ( name: StringName
) const1
Returns the Animation
with the key name
. If the animation does not exist, null
is returned and an error is logged.
Array StringName
get_animation_list ( ) const1
Returns the keys for the Animation
s stored in the library.
bool
has_animation ( name: StringName
) const1
Returns true
if the library stores an Animation
with name
as the key.
void
remove_animation ( name: StringName
)
Removes the Animation
with the key name
.
void
rename_animation ( name: StringName
, newname: StringName
)
Changes the key of the Animation
associated with the key name
to newname
.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。