CorsixTH Lua Documentation

SwingDoor Class

Declared on: line 33 of Lua/objects/doors/swing_door_right.lua.
Inheritance: SwingDoor » Door » Object » Entity

Method Index

Member Index

(*) only used in superclass methods
function SwingDoor:SwingDoor(hospital, object_type, x, y, direction, etc)

Parameters:

NameTypeDescription
hospital ? ?
object_type ? ?
x ? ?
y ? ?
direction ? ?
etc ? ?

Declared on: line 38 of Lua/objects/doors/swing_door_right.lua.

function SwingDoor:afterLoad(old, new)

Parameters:

NameTypeDescription
old ? ?
new ? ?

Overrides: Door:afterLoad.
Declared on: line 190 of Lua/objects/doors/swing_door_right.lua.

function SwingDoor:checkPaired(x, y)

Checks to see if the swing doors have paired correctly

Parameters:

NameTypeDescription
x ? ?
y ? ?

Declared on: line 77 of Lua/objects/doors/swing_door_right.lua.

function SwingDoor:getDynamicInfo()

Depending on if this is a master or slave show the correct information.

Overrides: Entity:getDynamicInfo.
Declared on: line 110 of Lua/objects/doors/swing_door_right.lua.

function SwingDoor:onClick(ui, button)

Depending on if this is a master or slave different onClick functions are called.

Parameters:

NameTypeDescription
ui ? ?
button ? ?

Overrides: Door:onClick.
Declared on: line 92 of Lua/objects/doors/swing_door_right.lua.

function SwingDoor:pairDoors(x, y)

Links the master to the slave swing door. This allows the slave to mimic the

master in interactions

Parameters:

NameTypeDescription
x num Coordinate
y num Coordinate

Declared on: line 48 of Lua/objects/doors/swing_door_right.lua.

function SwingDoor:swing(anim, flags)

The actual swinging is done in this class.

Parameters:

NameTypeDescription
anim integer The animation to use.
flags integer Flags, if any, associated with the animation.

Declared on: line 151 of Lua/objects/doors/swing_door_right.lua.

function SwingDoor:swingDoors(direction, length)

Makes the pair of swing doors start swinging in the correct fashion.

Parameters:

NameTypeDescription
direction string The direction in which to swing. Allowed values are "in" and "out".
length integer How long the swing animation is for the entering/leaving entity.

Declared on: line 129 of Lua/objects/doors/swing_door_right.lua.

function SwingDoor:swingSlave(direction)

Tell the associated slave door to start swinging.

Parameters:

NameTypeDescription
direction string The direction in which to swing. Allowed values are "in" and "out".

Declared on: line 115 of Lua/objects/doors/swing_door_right.lua.

function SwingDoor:updateDynamicInfo()

Depending on if this is a master or slave update the correct information.

Overrides: Door:updateDynamicInfo.
Declared on: line 101 of Lua/objects/doors/swing_door_right.lua.