Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

AnimationLibrary

Hérite de : Resource < RefCounted < Object

Conteneur pour des ressources Animation.

Description

Une bibliothèque d'animation stocke un ensemble d'animations accessibles par les clés StringName, pour une utilisation avec les nœuds AnimationPlayer.

Tutoriels

Méthodes

Error

add_animation(name: StringName, animation: Animation)

Animation

get_animation(name: StringName) const

Array[StringName]

get_animation_list() const

int

get_animation_list_size() const

bool

has_animation(name: StringName) const

void

remove_animation(name: StringName)

void

rename_animation(name: StringName, newname: StringName)


Signaux

animation_added(anim_name: StringName) 🔗

Emitted when an Animation is added, under the key anim_name.


animation_changed(anim_name: StringName) 🔗

Emitted when there's a change in one of the animations, e.g. tracks are added, moved or have changed paths. anim_name is the key of the animation that was changed.

See also Resource.changed, which this acts as a relay for.


animation_removed(anim_name: StringName) 🔗

Emitted when an Animation stored with the key anim_name is removed.


animation_renamed(old_name: StringName, new_name: StringName) 🔗

Emitted when the key for an Animation is changed, from old_name to new_name.


Descriptions des méthodes

Error add_animation(name: StringName, animation: Animation) 🔗

Ajoute l'animation à la bibliothèque, accessible par la clé name.


Animation get_animation(name: StringName) const 🔗

Renvoie l'Animation avec la clé name. Si l'animation n'existe pas, null est renvoyé est une erreur est enregistrée.


Array[StringName] get_animation_list() const 🔗

Renvoie les clés pour les Animations stockées dans la bibliothèque.


int get_animation_list_size() const 🔗

Renvoie le compte de clés pour les Animations stockées dans la bibliothèque.


bool has_animation(name: StringName) const 🔗

Renvoie true si la bibliothèque stocke une Animation avec name comme clé.


void remove_animation(name: StringName) 🔗

Supprime l'Animation avec la clé name.


void rename_animation(name: StringName, newname: StringName) 🔗

Change la clé de l'Animation associée à la clé name à newname.