Module ROT.EventQueue

Stores and retrieves events based on time.

Functions

getTime () Get Time.
clear () Clear.
add (event, time) Add.
get () Get.
getEventTime (event) Get event time.
remove (event) Remove.


Functions

getTime ()
Get Time. Get time counted since start

Returns:

    int elapsed time
clear ()
Clear. Remove all events from queue

Returns:

    ROT.EventQueue self
add (event, time)
Add. Add an event

Parameters:

  • event any Any object
  • time int The number of time units that will elapse before this event is returned
get ()
Get. Get the next event from the queue and advance the appropriate amount time

Returns:

    event or nil The event previously added by .add() or nil if none are queued
getEventTime (event)
Get event time. Get the time associated with the given event

Parameters:

  • event any

Returns:

    number time
remove (event)
Remove. Find and remove an event from the queue

Parameters:

  • event any The previously added event to be removed

Returns:

    boolean true if an event was removed from the queue
generated by LDoc 1.4.6 Last updated 2017-07-19 18:43:03