Module mob.bat

Bat class, subclass of Mob .

A bat monster!

Texto alternativo

LIFE  = 50
SPEED = 50
STATE = 'stop|walk'

State machine

Bat:_stopState (dt) “stop” state of the state machine.
Bat:_walkState (dt) “walk” state of the state machine.

Class Bat

Bat:initialize (x, y, level) Initialize the object Bat .


State machine

State machine.
Bat:_stopState (dt)
“stop” state of the state machine. The bat is stoped.

Parameters:

  • dt delta time
Bat:_walkState (dt)
“walk” state of the state machine. The bat is flying.

Parameters:

  • dt delta time

Class Bat

Bat Class, subclass of Mob
Bat:initialize (x, y, level)
Initialize the object Bat .

Don’t call this method directly!, this method is called automatically when the class is instanciated using the method new.

Parameters:

  • x world x coordinate
  • y world y coordinate
  • level Level where the object belongs

Usage:

    Bat:new(x,y,level)
generated by LDoc 1.3.12