整理代码
更多帧更新改为时间更新 微调cubes背景 微调音乐室ui
This commit is contained in:
@@ -6,10 +6,10 @@ local TASK={}
|
||||
function TASK.getCount()
|
||||
return #tasks
|
||||
end
|
||||
local trigTime=0
|
||||
local trigFrame=0
|
||||
function TASK.update(dt)
|
||||
trigTime=trigTime+dt
|
||||
while trigTime>1/60 do
|
||||
trigFrame=trigFrame+dt*60
|
||||
while trigFrame>=1 do
|
||||
for i=#tasks,1,-1 do
|
||||
local T=tasks[i]
|
||||
if status(T.thread)=='dead'then
|
||||
@@ -18,7 +18,7 @@ function TASK.update(dt)
|
||||
assert(resume(T.thread))
|
||||
end
|
||||
end
|
||||
trigTime=trigTime-1/60
|
||||
trigFrame=trigFrame-1
|
||||
end
|
||||
end
|
||||
function TASK.new(code,...)
|
||||
|
||||
Reference in New Issue
Block a user