【Defold】Coroutine 処理を行う

Defold

公式

API reference (coroutine)
Defold is a free and open game engine used for development of console, desktop, mobile and web games.
local function async(func)
    local co = coroutine.running()
    func(function()
        local ok, err = coroutine.resume(co)
        if not ok then print(err) end
    end)
    coroutine.yield()
end

アセットの方が便利かも

DefUniCo
DefUniCo is a coroutine library