GAME.rec更名GAME.rep
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user