GAME.rec更名GAME.rep

This commit is contained in:
MrZ626
2020-12-14 16:48:44 +08:00
parent ca9565bb60
commit a12df840a4
4 changed files with 7 additions and 7 deletions

View File

@@ -553,7 +553,7 @@ function resetGameData(replaying)
GAME.recording=true
GAME.replaying=false
GAME.setting=copyGameSetting()
GAME.rec={}
GAME.rep={}
GAME.rank=0
math.randomseed(tm.getTime())
GAME.seed=rnd(1046101471,2662622626)

View File

@@ -213,7 +213,7 @@ GAME={--Global game data
curMode=nil, --Current gamemode object
modeEnv=nil, --Current gamemode environment
setting={}, --Game settings
rec={}, --Recording list, key,time,key,time...
rep={}, --Recording list, key,time,key,time...
recording=false, --If recording
replaying=false, --If replaying
saved=false, --If recording saved

View File

@@ -51,8 +51,8 @@ end
local function pressKey_Rec(P,keyID)
if P.keyAvailable[keyID]then
if GAME.recording then
ins(GAME.rec,GAME.frame+1)
ins(GAME.rec,keyID)
ins(GAME.rep,GAME.frame+1)
ins(GAME.rep,keyID)
end
P.keyPressing[keyID]=true
P.actList[keyID](P)
@@ -67,8 +67,8 @@ local function pressKey_Rec(P,keyID)
end
local function releaseKey_Rec(P,keyID)
if GAME.recording then
ins(GAME.rec,GAME.frame+1)
ins(GAME.rec,-keyID)
ins(GAME.rep,GAME.frame+1)
ins(GAME.rep,-keyID)
end
P.keyPressing[keyID]=false
end

View File

@@ -169,7 +169,7 @@ function scene.update(dt)
--Replay
if GAME.replaying then
_=GAME.replaying
local L=GAME.rec
local L=GAME.rep
while GAME.frame==L[_]do
local k=L[_+1]
if k>0 then