Complete API reference for Animation, including constructors, attributes, virtual attributes, and methods.
Package: JAVARuntime
Category: Animations
Component: no
Constructors
| Signature | Description |
|---|
Animation(AnimationInstance) | Executes Animation and returns after the underlying engine call finishes. |
Animation(Engine) | Executes Animation and returns after the underlying engine call finishes. |
Animation() | Executes Animation and returns after the underlying engine call finishes. |
Attributes
| Name | Type | Description |
|---|
instance | AnimationInstance | Represents the instance value stored on this instance. Read or assign to update the property. |
Virtual Attributes
| Name | Type | Access | Description |
|---|
fps | int | get/set | Returns the fps of the animation. |
frameTime | float | get/set | Returns the current frame of the animation. |
speed | float | get/set | Returns the speed of the animation. |
timeLineCount | int | get | Returns the timeline count of the animation. |
weight | float | get/set | Returns the speed of the animation. |
Methods
| Signature | Returns | Description |
|---|
play() | void | Plays the animation. |
playInLoop() | void | Plays the animation in a loop. |
stop() | void | Stops the animation. |
stopLoop() | void | Stops the looping animation. |
isPlaying() | boolean | Returns whether the animation is playing. |
isLoop() | boolean | Returns whether the animation is looping. |
getTimeLineAt(int) | TimeLine | Returns the animation timeline at the specified index. |
addTimeLine(TimeLine) | void | Adds a timeline to the animation. |
removeTimeLine(TimeLine) | void | Removes a timeline from the animation. |
getLength() | int | Returns the length of the animation. |
sortFrames() | void | Sorts animation frames. Call after modifying an animation. |
Static Methods
| Signature | Returns | Description |
|---|
loadFile(AnimationFile) | Animation | Load an AnimationFile. |