Drag[en]gine Script Module DragonScript Script API  1.0
Animation Class Reference

Immutable animation resources. More...

Inheritance diagram for Animation:

Public Member Functions

Management
String getFilename ()
 Normalized filename the animation has been loaded from. More...
 
float getMovePlaytime (String name)
 Playtime in seconds of named move. 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...
 
static void loadAsynchron (String filename, ResourceNotifier notifier)
 Load animation from file asynchronously. More...
 

Detailed Description

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.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ equals()

bool equals ( Object  other)

Animation is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type Animation and both point to the same engine animation resource.

§ getFilename()

String getFilename ( )

Normalized filename the animation has been loaded from.

§ getMovePlaytime()

float getMovePlaytime ( String  name)

Playtime in seconds of named move.

If the move is not found 0 is returned.

§ hashCode()

int hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

§ loadAsynchron()

static void loadAsynchron ( String  filename,
ResourceNotifier  notifier 
)
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 notifier is used to deliver the loaded animation or null if the loading failed.

§ new()

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.


The documentation for this class was generated from the following file: