Zframework的控件/场景/文本/任务模块支持基于时间更新
修改几处其他地方基于时间update
This commit is contained in:
@@ -163,12 +163,12 @@ function scene.keyDown(key)
|
||||
end
|
||||
end
|
||||
|
||||
function scene.update()
|
||||
function scene.update(dt)
|
||||
if not LOADED then
|
||||
loading=loadingThread()
|
||||
progress=progress+1
|
||||
else
|
||||
t1,t2=t1+1,t2+1
|
||||
t1,t2=t1+dt*60,t2+dt*60
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ end
|
||||
|
||||
function scene.update(dt)
|
||||
PLAYERS[1]:update(dt)
|
||||
scrollX=scrollX-2.6
|
||||
scrollX=scrollX-162*dt
|
||||
if scrollX<-tip:getWidth()then
|
||||
scrollX=tipLength
|
||||
tip:set(text.getTip())
|
||||
|
||||
Reference in New Issue
Block a user