Destructable

Handle Wrappers View source
Destructable

Source on GitHub

Tuples

gate

public tuple gate(destructable killable)

Tuple wrapper for destructable gates API

elevator

public tuple elevator(destructable elevatable)

Tuple wrapper for destructable elevator API

Functions

createDestructable

public function createDestructable(int id, vec3 pos, angle direction, real scale, int variation) returns destructable

createDestructable

public function createDestructable(int id, vec2 pos, angle direction, real scale, int variation) returns destructable

isElevatorHeightInBounds

public function isElevatorHeightInBounds(int height) returns bool

Returns elevator adjusted height based on given bounds

getElevatorHeightBound

public function getElevatorHeightBound(int height) returns int

Returns elevator adjusted height based on given bounds

Extension Functions

destructable.getPos

public function destructable.getPos() returns vec2

destructable.getX

public function destructable.getX() returns real

destructable.getY

public function destructable.getY() returns real

destructable.kill

public function destructable.kill()

destructable.getTypeId

public function destructable.getTypeId() returns int

destructable.setAnimation

public function destructable.setAnimation(string anim)

destructable.remove

public function destructable.remove()

destructable.setInvulnerable

public function destructable.setInvulnerable(bool flag)

destructable.getInvulnerable

public function destructable.getInvulnerable() returns bool

destructable.setLife

public function destructable.setLife(real life)

destructable.getLife

public function destructable.getLife() returns real

destructable.setMaxLife

public function destructable.setMaxLife(real max)

destructable.getMaxLife

public function destructable.getMaxLife() returns real

destructable.restoreLife

public function destructable.restoreLife(real life, boolean birth)

destructable.queueAnimation

public function destructable.queueAnimation(string anim)

destructable.setAnimationSpeed

public function destructable.setAnimationSpeed(real speedFactor)

destructable.show

public function destructable.show(bool flag)

destructable.getOccluderHeight

public function destructable.getOccluderHeight() returns real

destructable.setOccluderHeight

public function destructable.setOccluderHeight(real height)

destructable.getName

public function destructable.getName() returns string

gate.open

public function gate.open()

Opens a destructable gate

gate.close

public function gate.close()

Closes a destructable gate

gate.kill

public function gate.kill()

Destroys a destructable gate

gate.setOpen

public function gate.setOpen(bool flag)

Sets the gate’s open/close state

elevator.up

public function elevator.up()

Moves a destructable elevator one step up

elevator.down

public function elevator.down()

Moves a destructable elevator one step down

elevator.elevatorSetHeight

public function elevator.elevatorSetHeight(int height)

Moves a destructable elevator to given height

elevator.getHeight

public function elevator.getHeight() returns int

Get a destructable elevator height

elevator.setHeight

public function elevator.setHeight(int height)

Set elevator height to given value.