A data structure representing an animation in a spritesheet. This is a generic data structure used by characters, stage props, and more! BE CAREFUL when changing it.

Fields

@:optionaloptionalprefix:Null<String>

* The prefix for the frames of the animation as defined by the XML file. * This will may or may not differ from the `name` of the animation, * depending on how your animator organized their FLA or whatever. * * NOTE: For Sparrow animations, this is not optional, but for Packer animations it is.

@:default([0, 0])@:optionaloptionaloffsets:Null<Array<Float>>

* Offset the character's position by this amount when playing this animation. * @default [0, 0]

name:String

* The name for the animation. * This should match the animation name queried by the game; * for example, characters need animations with names `idle`, `singDOWN`, `singUPmiss`, etc.

@:default(false)@:optionaloptionallooped:Null<Bool>

* Whether the animation should loop when it finishes. * @default false

@:default(24)@:optionaloptionalframeRate:Null<Int>

* The frame rate of the animation. * @default 24

@:default([])@:optionaloptionalframeIndices:Null<Array<Int>>

* If you want this animation to use only certain frames of an animation with a given prefix, * select them here. * @example [0, 1, 2, 3] (use only the first four frames) * @default [] (all frames)

@:default(false)@:optionaloptionalflipY:Null<Bool>

* Whether the animation's sprites should be flipped vertically. * @default false

@:default(false)@:optionaloptionalflipX:Null<Bool>

* Whether the animation's sprites should be flipped horizontally. * @default false

@:optionaloptionalassetPath:Null<String>

* Optionally specify an asset path to use for this specific animation. * ONLY for use by MultiSparrow and MultiAnimateAtlas characters. * @default The assetPath of the parent sprite

@:default("framelabel")@:optionaloptionalanimType:Null<String>

* The type of animation to use. * Only available for texture atlases. * Options: "framelabel", "symbol"