CorsixTH Lua Documentation

AnimationManager Class

Utility class for setting animation markers and querying animation length.

Declared on: line 445 of Lua/graphics.lua.

Method Index

Member Index

function AnimationManager:AnimationManager(anims)

Parameters:

NameTypeDescription
anims ? ?

Declared on: line 448 of Lua/graphics.lua.

function AnimationManager:getAnimLength(anim)

Parameters:

NameTypeDescription
anim ? ?

Declared on: line 458 of Lua/graphics.lua.

function AnimationManager:setAnimLength(anim, length)

For overriding animations which have builtin repeats or excess frames

Parameters:

NameTypeDescription
anim ? ?
length ? ?

Declared on: line 453 of Lua/graphics.lua.

function AnimationManager:setMarker(anim, ...)

Markers can be set using a variety of different arguments: setMarker(anim_number, position) setMarker(anim_number, start_position, end_position) setMarker(anim_number, keyframe_1, keyframe_1_position, keyframe_2, ...) position should be a table; {x, y} for a tile position, {x, y, "px"} for a pixel position, with (0, 0) being the origin in both cases. The first variant of setMarker sets the same marker for each frame. The second variant does linear interpolation of the two positions between the first frame and the last frame. The third variant does linear interpolation between keyframes, and then the final position for frames after the last keyframe. The keyframe arguments should be 0-based integers, as in the animation viewer. To set the markers for multiple animations at once, the anim_number argument can be a table, in which case the marker is set for all values in the table. Alternatively, the values function (defined in utility.lua) can be used in conjection with a for loop to set markers for multiple things. --

Parameters:

NameTypeDescription
anim ? ?
... ? ?

Declared on: line 474 of Lua/graphics.lua.

function AnimationManager:setMarkerRaw(anim, fn, arg1, arg2, ...)

Parameters:

NameTypeDescription
anim ? ?
fn ? ?
arg1 ? ?
arg2 ? ?
... ? ?

Declared on: line 511 of Lua/graphics.lua.

function AnimationManager:setSecondaryMarker(anim, ...)

Parameters:

NameTypeDescription
anim ? ?
... ? ?

Declared on: line 499 of Lua/graphics.lua.

Page generated on Sat Feb 07, 2015 at 18:38:27 by LDocGen.