Drag[en]gine Script Module DragonScript
1.21
|
Immutable animation resources. More...
Public Member Functions | |
Management | |
String | getFilename () |
Normalized filename the animation has been loaded from. More... | |
int | getBoneCount () |
Count of bones. More... | |
int | indexOfBoneNamed (String name) |
Index of named bone or -1 if not found. More... | |
String | getBoneName (int index) |
Name of bone at index. More... | |
int | getMoveCount () |
Count of moves. More... | |
int | indexOfMoveNamed (String name) |
Index of named move or -1 if not found. More... | |
String | getMoveName (int index) |
Name of move at index. More... | |
float | getMovePlaytime (String name) |
Playtime in seconds of named move. More... | |
float | getMoveFPS (String name) |
Frames per second. More... | |
bool | equals (Object other) |
Animation is equal to another object. More... | |
int | hashCode () |
Hash code for use as dictionary keys. More... | |
Constructors | |
Animation | new (String filename) |
Load animation from file. More... | |
void | save (String filename) |
Save animation to file. More... | |
static void | loadAsynchron (String filename, ResourceListener listener) |
Load animation from file asynchronously. More... | |
Immutable animation resources.
Animation resources provide static precanned animation data to be used with Animators to produce dynamic animations.
This is a native class. It can not be subclassed.
bool Dragengine.Scenery.Animation.equals | ( | Object | other | ) |
int Dragengine.Scenery.Animation.getBoneCount | ( | ) |
Count of bones.
String Dragengine.Scenery.Animation.getBoneName | ( | int | index | ) |
Name of bone at index.
index | Index of bone to get name of |
EInvalidParam | index is less than 0 or larger than or equal to getBoneCount(). |
String Dragengine.Scenery.Animation.getFilename | ( | ) |
Normalized filename the animation has been loaded from.
int Dragengine.Scenery.Animation.getMoveCount | ( | ) |
Count of moves.
float Dragengine.Scenery.Animation.getMoveFPS | ( | String | name | ) |
Frames per second.
Used for saving only if animation file format requires sampling.
String Dragengine.Scenery.Animation.getMoveName | ( | int | index | ) |
Name of move at index.
index | Index of move to get name of |
EInvalidParam | index is less than 0 or larger than or equal to getMoveCount(). |
float Dragengine.Scenery.Animation.getMovePlaytime | ( | String | name | ) |
Playtime in seconds of named move.
If the move is not found 0 is returned.
int Dragengine.Scenery.Animation.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
int Dragengine.Scenery.Animation.indexOfBoneNamed | ( | String | name | ) |
Index of named bone or -1 if not found.
int Dragengine.Scenery.Animation.indexOfMoveNamed | ( | String | name | ) |
Index of named move or -1 if not found.
|
static |
Load animation from file asynchronously.
Registers a request in the game engine to load an animation. Once finished or if the file is already loaded the listener is used to deliver the loaded animation or null if the loading failed.
Animation Dragengine.Scenery.Animation.new | ( | String | filename | ) |
Load animation from file.
If the animation file has been already loaded it is assigned to this object. If the animation is not loaded yet the engine loads the animation. This call blocks until the animation is fully loaded and ready to be used. For asynchronous loading use loadAsynchron(). Multiple objects can point to the same loaded animation resource. Once no object instance uses an animation file anymore it is released from memory.
void Dragengine.Scenery.Animation.save | ( | String | filename | ) |
Save animation to file.