Class ROT.EventQueue
Generic event queue: stores events and retrieves them based on their time
Defined in: <rot.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
add(event, time)
|
|
clear()
Clear all scheduled events
|
|
get()
Locates the nearest event, advances time if necessary.
|
|
getTime()
|
|
remove(event)
Remove an event from the queue
|
Method Detail
add(event, time)
- Parameters:
- {?} event
- {number} time
clear()
Clear all scheduled events
{? || null}
get()
Locates the nearest event, advances time if necessary. Returns that event and removes it from the queue.
- Returns:
- {? || null} The event previously added by addEvent, null if no event available
{number}
getTime()
- Returns:
- {number} Elapsed time
{bool}
remove(event)
Remove an event from the queue
- Parameters:
- {?} event
- Returns:
- {bool} success?