Skip to main content

Enemy

Static

moveAll

Move all the enemies if canMove() returns true.

Enemy.moveAll(enemies: array) -> none

removeAll

Removes all the enemies in the given array.

Enemy.removeAll(enemies: array) -> none

Methods

moveVertical

enemy:moveVertical() -> none

Moves the instance vertically.

moveHorizontal

Moves the instance horizontally.

enemy.moveHorizontal() -> none

cleanup

Removes all references of the instance.

enemy:cleanup() -> none

move

Moves the enemy according to movex and movey.

enemy:move() -> none

canMove

Returns true if the enemy can move.

enemy:canMove() -> boolean

Properties

sprite

  • Type: sprite instance

Sprite to represent the enemy.