直接放入Zframework文件
This commit is contained in:
18
Zframework/test.lua
Normal file
18
Zframework/test.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
local yield=coroutine.yield
|
||||
local TEST={}
|
||||
|
||||
-- Wait for the scene swapping animation to finish
|
||||
function TEST.yieldUntilNextScene()
|
||||
while SCN.swapping do yield() end
|
||||
end
|
||||
|
||||
function TEST.yieldN(frames)
|
||||
for _=1,frames do yield() end
|
||||
end
|
||||
|
||||
function TEST.yieldT(timeout)
|
||||
local t=0
|
||||
repeat t=t+yield() until t>=timeout
|
||||
end
|
||||
|
||||
return TEST
|
||||
Reference in New Issue
Block a user