Home

Animation

Specifies an animation that can be used in the game.

Note that if any frame of the animation is specified from the same source as any other Sprite or frame of other animation, it will be shared.

Type

struct

Properties

layers

If this property is present, all Animation definitions have to be placed as entries in the array, and they will all be loaded from there. layers may not be an empty table. Each definition in the array may also have the layers property.

animation_speed and max_advance of the first layer are used for all layers. All layers will run at the same speed.

If this property is present, all other properties, including those inherited from AnimationParameters, are ignored.

filename

Only loaded if layers is not defined. Mandatory if neither stripes nor filenames are defined.

The path to the sprite file to use.

stripes

Only loaded if layers is not defined.

filenames

Only loaded if neither layers nor stripes are defined.

slice

Only loaded if layers is not defined and if filenames is defined.

lines_per_file

Only loaded if layers is not defined. Mandatory if filenames is defined.