微调取消暂停动画,添加音效
This commit is contained in:
@@ -6,7 +6,7 @@ local scene={}
|
|||||||
local timer
|
local timer
|
||||||
|
|
||||||
function scene.sceneInit()
|
function scene.sceneInit()
|
||||||
timer=2
|
timer=1
|
||||||
end
|
end
|
||||||
|
|
||||||
scene.keyDown=NULL
|
scene.keyDown=NULL
|
||||||
@@ -14,25 +14,29 @@ scene.mouseDown=NULL
|
|||||||
scene.touchDown=NULL
|
scene.touchDown=NULL
|
||||||
|
|
||||||
function scene.update(dt)
|
function scene.update(dt)
|
||||||
timer=timer-dt
|
timer=timer-dt*.8
|
||||||
if timer<0 then
|
if timer<0 then
|
||||||
|
SFX.play("click")
|
||||||
SCN.swapTo("play","none")
|
SCN.swapTo("play","none")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
if timer<1 then
|
--Game scene
|
||||||
|
if timer*1.5<1 then
|
||||||
SCN.scenes.play.draw()
|
SCN.scenes.play.draw()
|
||||||
end
|
end
|
||||||
|
|
||||||
gc.setColor(.15,.15,.15,timer)
|
--Grey screen cover
|
||||||
|
gc.setColor(.15,.15,.15,timer*1.5)
|
||||||
gc.push("transform")
|
gc.push("transform")
|
||||||
gc.origin()
|
gc.origin()
|
||||||
gc.rectangle("fill",0,0,SCR.w,SCR.h)
|
gc.rectangle("fill",0,0,SCR.w,SCR.h)
|
||||||
gc.pop()
|
gc.pop()
|
||||||
|
|
||||||
gc.setColor(1,1,1,5*(2-timer))
|
--Pie counter
|
||||||
gc.arc("fill","pie",640,360,160,-1.5708,timer*3.1416-1.5708)
|
gc.setColor(1,1,1,4*(1-timer))
|
||||||
|
gc.arc("fill","pie",640,360,160,-1.5708,timer*6.2832-1.5708)
|
||||||
end
|
end
|
||||||
|
|
||||||
return scene
|
return scene
|
||||||
Reference in New Issue
Block a user