Keep up the pace

This commit is contained in:
Trebor-Huang
2021-11-01 09:52:41 +08:00
11 changed files with 150 additions and 167 deletions

View File

@@ -23,7 +23,7 @@ function TASK.update(dt)
end
function TASK.new(code,...)
local thread=coroutine.create(code)
resume(thread,...)
assert(resume(thread,...))
if status(thread)~='dead'then
tasks[#tasks+1]={
thread=thread,