完善玩家刷新机制 close #335

This commit is contained in:
MrZ626
2021-09-28 01:55:57 +08:00
parent 438fef9f26
commit 4bf7ef0e25
5 changed files with 91 additions and 97 deletions

View File

@@ -275,23 +275,6 @@ function scene.gamepadUp(key)
end
end
local function _update_replay(repPtr)
local P1=PLAYERS[1]
local L=GAME.rep
while P1.frameRun==L[repPtr]do
local key=L[repPtr+1]
if key==0 then--Just wait
elseif key<=32 then--Press key
P1:pressKey(key)
VK.press(key)
elseif key<=64 then--Release key
P1:releaseKey(key-32)
VK.release(key-32)
end
repPtr=repPtr+2
end
GAME.replaying=repPtr
end
local function _update_common(dt)
--Update control
touchMoveLastFrame=false
@@ -312,9 +295,6 @@ function scene.update(dt)
trigGameRate=trigGameRate+gameRate
while trigGameRate>=1 do
trigGameRate=trigGameRate-1
if GAME.replaying then
_update_replay(GAME.replaying)
end
_update_common(dt)
end
end