录像回放时esc也可以暂停,暂停恢复不改变回放速度
This commit is contained in:
@@ -5,7 +5,7 @@ local GAME=GAME
|
|||||||
|
|
||||||
local noTouch,noKey=false,false
|
local noTouch,noKey=false,false
|
||||||
local touchMoveLastFrame=false
|
local touchMoveLastFrame=false
|
||||||
local floatRepRate,replayRate
|
local floatRepRate,replayRate=0,1
|
||||||
|
|
||||||
local repRateStrings={[0]="pause",[.125]="0.125x",[.5]="0.5x",[1]="1x",[2]="2x",[5]="5x"}
|
local repRateStrings={[0]="pause",[.125]="0.125x",[.5]="0.5x",[1]="1x",[2]="2x",[5]="5x"}
|
||||||
local function _rep0()replayRate=0 end
|
local function _rep0()replayRate=0 end
|
||||||
@@ -18,12 +18,14 @@ local function _step()floatRepRate=floatRepRate+1 end
|
|||||||
|
|
||||||
local scene={}
|
local scene={}
|
||||||
|
|
||||||
function scene.sceneInit()
|
function scene.sceneInit(org)
|
||||||
if GAME.init then
|
if GAME.init then
|
||||||
resetGameData()
|
resetGameData()
|
||||||
GAME.init=false
|
GAME.init=false
|
||||||
end
|
end
|
||||||
floatRepRate,replayRate=0,1
|
if org~='pause'then
|
||||||
|
floatRepRate,replayRate=0,1
|
||||||
|
end
|
||||||
noKey=GAME.replaying
|
noKey=GAME.replaying
|
||||||
noTouch=not SETTING.VKSwitch or noKey
|
noTouch=not SETTING.VKSwitch or noKey
|
||||||
WIDGET.active.restart.hide=GAME.replaying
|
WIDGET.active.restart.hide=GAME.replaying
|
||||||
@@ -115,6 +117,8 @@ function scene.keyDown(key,isRep)
|
|||||||
elseif replayRate==5 then replayRate=2
|
elseif replayRate==5 then replayRate=2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
elseif key=="escape"then
|
||||||
|
pauseGame()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user