The Task Manager is used to perform tasks (call methods) in specified order. Allows you to quickly and easily program any action, such as the appearance of the buttons in the game menus. Task Manager is started automatically when you add at least one task, and stops when all tasks are done.
11.19.2012
.Constructor
Variables
Methods
addInstantTask(Function:() ‑> Bool, IgnoreCycle:Bool = false):Void
Adds a task to the end of queue, the method will be executed only ONCE, after that we go to the next task.
Parameters:
Function | Method-task to be executed in sequence. |
---|---|
IgnoreCycle | If true then the task will be deleted from the manager immediately after execution. |
addPause(Delay:Float, IgnoreCycle:Bool = false):Void
Adds a pause between tasks
Parameters:
Delay | Pause duration |
---|---|
IgnoreCycle | If true, the pause will be executed only once per cycle |
addTask(Function:() ‑> Bool, IgnoreCycle:Bool = false):Void
Adds a task to the end of queue, the method will be executed while it returns false. The task will be completed only when the method will return true. And manager will switch to the next task.
Parameters:
Function | Method-task to be executed in sequence. |
---|---|
IgnoreCycle | If true then the task will be deleted from the manager immediately after execution. |
addUrgentInstantTask(Function:() ‑> Bool, IgnoreCycle:Bool = false):Void
Adds a task to the top of the queue, the method will be executed only ONCE, after that we go to the next task.
Parameters:
Function | Method-task to be executed in sequence. |
---|---|
IgnoreCycle | If true then the task will be deleted from the manager immediately after execution. |
addUrgentTask(Function:() ‑> Bool, IgnoreCycle:Bool = false):Void
Adds a task to the top of the queue, the method will be executed while it returns false. The task will be completed only when the method will return true, and the manager will move to the next task.
Parameters:
Function | Method-task to be executed in sequence. |
---|---|
IgnoreCycle | If true then the task will be deleted from the manager immediately after execution. |