CorsixTH Lua Documentation

AnimationManager Class

Utility class for setting animation markers and querying animation length.

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

Method Index

Member Index

function AnimationManager:AnimationManager(anims)

Parameters:

NameTypeDescription
anims ? ?

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

function AnimationManager:getAnimLength(anim)

Parameters:

NameTypeDescription
anim ? ?

Declared on: line 334 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 350 of Lua/graphics.lua.

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

Parameters:

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

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

function AnimationManager:setSecondaryMarker(anim, ...)

Parameters:

NameTypeDescription
anim ? ?
... ? ?

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

Page generated on Thu Jun 24, 2010 at 02:46:54 by LDocGen.