class flixel.animation.FlxAnimation extends FlxBaseAnimation

Available on all platforms

Just a helper structure for the FlxSprite animation system.

Instance Fields

var curFrame:Int

Keeps track of the current frame of animation. * This is NOT an index into the tile sheet, but the frame number in the animation object.

var delay:Float

Seconds between frames (basically the framerate)

var finished:Bool

Whether the current animation has finished.

var frameRate:Int

Animation frameRate - the speed in frames per second that the animation should play at.

var looped:Bool

Whether or not the animation is looped

var numFrames:Int

Accesor for frames.length

var paused:Bool

Whether the current animation gets updated or not.

function new(Parent:FlxAnimationController, Name:String, Frames:Array<Int>, ?FrameRate:Int = 0, ?Looped:Bool = true):Void

Name

What this animation should be called (e.g. "run") *

Frames

An array of numbers indicating what frames to play in what order (e.g. 1, 2, 3) *

FrameRate

The speed in frames per second that the animation should play at (e.g. 40) *

Looped

Whether or not the animation is looped or just plays once

function destroy():Void

Clean up memory.

function play(?Force:Bool = false, ?Frame:Int = 0):Void

function restart():Void

function stop():Void

function update():Void