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

Eredita: Resource < RefCounted < Object

Contenitore per le risorse Animation.

Descrizione

Una libreria di animazione memorizza una serie di animazioni accessibili attraverso i chiavi StringName, per l'uso con i nodi AnimationPlayer.

Tutorial

Metodi

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)


Segnali

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.


Descrizioni dei metodi

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

Aggiunge l'animazione animation alla libreria, accessibile dalla chiave name.


Animation get_animation(name: StringName) const 🔗

Restituisce l'Animation con la chiave name. Se l'animazione non esiste, null è restituito ed è generato un errore.


Array[StringName] get_animation_list() const 🔗

Restituisce le chiavi per l'animazione memorizzata nella libreria.


int get_animation_list_size() const 🔗

Restituisce il numero di chiavi per le risorse Animation memorizzate nella libreria.


bool has_animation(name: StringName) const 🔗

Restituisce true se la libreria memorizza un animazione con name come chiave.


void remove_animation(name: StringName) 🔗

Rimuove l'animazione con la chiave name.


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

Modifica la chiave dell'Animation associata con la chiave name a newname.