Component_FrameAnimation Class
Executes a classic image-frame animation defined in Database. The image in regular contains multiple sub-images (frames) which are then animated by modifying the srcRect property of the game object.
Item Index
Methods
Methods
refresh
-
record
Refreshes the animation from the specified database-record.
Parameters:
-
record
Object- The animation database-record.
start
()
Starts the frame-animation.
toDataBundle
()
Serializes the frame-animation into a data-bundle.
update
()
Updates the frame-animation.
Properties
firstRun
Boolean
protected
Indicates if its still the first run of the animation.
frameCount
Number
protected
The amount of frames to animate.
frameDuration
Number
The duration of the animation.
frameDuration
Number
protected
A frame-counter needed for animation-process.
frameDuration
Number
protected
The duration of a single frame.
frameRange
gs.Range
The frame-range to animation like only Frame 4 - 6 for example.
framesX
Number
The amount of frames on x-axis.
framesY
gs.AnimationPosition
The position of the animation on the target-object.
framesY
Number
The amount of frames on y-axis.
graphic
Object
The graphic used as image for the animation.
images
String
The images to animate through.
isRunning
Boolean
Indicates if the animation is currently running.
name
String
The name of the animation defined in Database.
patternOffset
Number
protected
Stores frame/pattern-offset.
patternOffset
Number
protected
Stores current frame/pattern
record
Object
The database record.
repeat
Boolean
Indicates if the animation repeats.
repetitionFrameRange
gs.Range
The frame-range used if the animation gets repeated.