Animation.getFrameCount ()
Get the number of frames in the animation
Animation.getFrameNumber ()
Get the current frame number
Animation.getFrameSize ()
Get the size of a single animation frame
Animation.getImageArea ()
Get the area of the source image (expressed as a fraction of the source image size) that is being used to draw this animation. If this wasn't modified with setImageArea(), by default the animation uses the full image from (0, 0) to (1, 1).
Animation.getImageName ()
Get the name of the image being used. This returns the full path and file name, including the basePath if a basePath was set. For a relative path, use Animation.getRelativeImageName()
Animation.getImageSize ()
Get the size of the image (i.e. the whole sprite sheet) being used for the animation
Animation.getRelativeImageName ()
Get the name of the image being used. This returns the relative file name, NOT including the basePath even if a basePath was set. For an absolute path, use Animation.getImageName()
Animation.play (direction)
Play the animation
Animation.serialize (stringify, propertiesToExclude)
Export this animation to an object that can then be used to create a new animation like this one (by passing the resulting object to the Animation constructor).
Animation.setFrameNumber (frameNumber)
Set the current animation frame
Animation.setImageArea (minX, minY, maxX, maxY)
Set the area of the source image that should be used to draw this animation. Numbers should be between 0 and 1, representing a fraction of the source image size.
Animation.setOffset (offset)
Set an offset for this animation. The parent sprite will be moved by this offset when this animation is playing
Animation.setSpeed (speed)
Set the current animation speed