Module ROT.Scheduler.Action
Action based turn scheduler.
Functions
add (item, repeating[, time=1]) | Add. |
clear () | Clear. |
remove (item) | Remove. |
next () | Next. |
setDuration (time) | set duration for the active item after calling next() this function defines the duration of that item's action |
Functions
- add (item, repeating[, time=1])
-
Add.
Add an item to the scheduler.
Parameters:
- item any The item that is returned when this turn comes up
- repeating boolean If true, when this turn comes up, it will be added to the queue again
- time int an initial delay time (default 1)
Returns:
-
ROT.Scheduler.Action
self
- clear ()
-
Clear.
empties this scheduler's event queue, no items will be returned by .next() until more are added with .add()
Returns:
-
ROT.Scheduler.Action
self
- remove (item)
-
Remove.
Looks for the next instance of item in the event queue
Parameters:
- item
Returns:
-
ROT.Scheduler.Action
self
- next ()
-
Next.
returns the next item based on that item's last action's duration
Returns:
-
item
- setDuration (time)
-
set duration for the active item
after calling next() this function defines the duration of that item's action
Parameters:
- time int The amount of time that the current item's action should last.
Returns:
-
ROT.Scheduler.Action
self