Skip to main content

Animation

Complete API reference for Animation, including constructors, attributes, virtual attributes, and methods.

Package: JAVARuntime

Category: Animations

Component: no


public class Animation

Constructors

SignatureDescription
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

NameTypeDescription
instanceAnimationInstanceRepresents the instance value stored on this instance. Read or assign to update the property.

Virtual Attributes

NameTypeAccessDescription
fpsintget/setReturns the fps of the animation.
frameTimefloatget/setReturns the current frame of the animation.
speedfloatget/setReturns the speed of the animation.
timeLineCountintgetReturns the timeline count of the animation.
weightfloatget/setReturns the speed of the animation.

Methods

SignatureReturnsDescription
play()voidPlays the animation.
playInLoop()voidPlays the animation in a loop.
stop()voidStops the animation.
stopLoop()voidStops the looping animation.
isPlaying()booleanReturns whether the animation is playing.
isLoop()booleanReturns whether the animation is looping.
getTimeLineAt(int)TimeLineReturns the animation timeline at the specified index.
addTimeLine(TimeLine)voidAdds a timeline to the animation.
removeTimeLine(TimeLine)voidRemoves a timeline from the animation.
getLength()intReturns the length of the animation.
sortFrames()voidSorts animation frames. Call after modifying an animation.

Static Methods

SignatureReturnsDescription
loadFile(AnimationFile)AnimationLoad an AnimationFile.