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.recording=true
GAME.replaying=false GAME.replaying=false
GAME.setting=copyGameSetting() GAME.setting=copyGameSetting()
GAME.rec={} GAME.rep={}
GAME.rank=0 GAME.rank=0
math.randomseed(tm.getTime()) math.randomseed(tm.getTime())
GAME.seed=rnd(1046101471,2662622626) GAME.seed=rnd(1046101471,2662622626)

View File

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

View File

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

View File

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