SpriteFrames¶
Inherits: Resource < Reference < Object
Sprite frame library for AnimatedSprite.
Descripción¶
Sprite frame library for AnimatedSprite. Contains frames and animation data for playback.
Note: You can associate a set of normal maps by creating additional SpriteFrames resources with a _normal suffix. For example, having 2 SpriteFrames resources run and run_normal will make it so the run animation uses the normal map.
Propiedades¶
Métodos¶
void |
add_animation ( String anim ) |
void |
add_frame ( String anim, Texture frame, int at_position=-1 ) |
void |
|
void |
clear_all ( ) |
get_animation_loop ( String anim ) const |
|
get_animation_names ( ) const |
|
get_animation_speed ( String anim ) const |
|
get_frame_count ( String anim ) const |
|
has_animation ( String anim ) const |
|
void |
remove_animation ( String anim ) |
void |
remove_frame ( String anim, int idx ) |
void |
rename_animation ( String anim, String newname ) |
void |
set_animation_loop ( String anim, bool loop ) |
void |
set_animation_speed ( String anim, float speed ) |
void |
Descripciones de Propiedades¶
Array frames
La propiedad de compatibilidad, siempre equivale a una array vacío.
Descripciones de Métodos¶
void add_animation ( String anim )
Añade una nueva animación a la biblioteca.
Añade un fotograma a la animación dada.
void clear ( String anim )
Elimina todos los fotogramas de la animación dada.
void clear_all ( )
Elimina todas las animaciones. Se creará una animación "por defecto".
Returns true if the given animation is configured to loop when it finishes playing. Otherwise, returns false.
PoolStringArray get_animation_names ( ) const
Devuelve un array que contiene los nombres asociados a cada animación. Los valores se colocan en orden alfabético.
La velocidad de la animación en fotogramas por segundo.
Devuelve el fotograma seleccionado de la animación.
Devuelve el número de fotogramas de la animación.
Si true, la animación nombrada existe.
void remove_animation ( String anim )
Elimina la animación dada.
Elimina el fotograma seleccionado de la animación.
Cambia el nombre de la animación a newname.
Si true, la animación se repetirá.
La velocidad de la animación en fotogramas por segundo.
Establece la textura del fotograma dado.