constructor
new YYC_Task(_func[, _arg])
A task.
Name | Type | Description |
---|---|---|
_func | func |
A function executed by the task. It will be passed _arg as the first argument and the task instance as the second. |
_arg | any |
An optional argument for the task function. Defaults to undefined . |
Name | Description |
---|---|
Arg | An argument for the task function. |
Func | A function executed by the task. |
Parent | The parent of the task. |
Name | Description |
---|---|
Run | Enqueues the task for execution. |
Creates a task that sleeps for 1 second and then prints a message.
// Create event
new YYC_Task(function (_ms) {
var _t = current_time;
while (current_time - _t < _ms) {}
show_debug_message("Slept for " + string(_ms) + "ms!");
}, 1000).Run();
// Step event
if (!yyc_is_boost())
{
yyc_tasks_update();
}
YYC_GroupTask, yyc_tasks_update
Copyright © 2021, Patrik Kraif. Built on October 14, 2021 using GMDoc.