Class ROT.Engine
Asynchronous main loop
Defined in: <rot.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
addActor(actor)
|
|
clear()
Remove all actors
|
|
lock()
Interrupt the engine by an asynchronous action
|
|
removeActor(actor)
Remove a previously added actor
|
|
start()
Start the main loop.
|
|
unlock()
Resume execution (paused by a previous lock)
|
Method Detail
addActor(actor)
- Parameters:
- {object} actor
- Anything with "getSpeed" and "act" methods
clear()
Remove all actors
lock()
Interrupt the engine by an asynchronous action
removeActor(actor)
Remove a previously added actor
- Parameters:
- {object} actor
start()
Start the main loop. When this call returns, the loop is locked.
unlock()
Resume execution (paused by a previous lock)