修改scene模块,支持在切换场景的时候传参了
This commit is contained in:
@@ -135,7 +135,7 @@ local function _checkGameKeyDown(key)
|
||||
return true--No key pressed
|
||||
end
|
||||
|
||||
function scene.sceneInit(org)
|
||||
function scene.sceneInit()
|
||||
if GAME.init then
|
||||
resetGameData()
|
||||
GAME.init=false
|
||||
@@ -145,7 +145,7 @@ function scene.sceneInit(org)
|
||||
noKey=replaying
|
||||
noTouch=not SETTING.VKSwitch or replaying
|
||||
|
||||
if org~='depause'and org~='pause'then
|
||||
if SCN.prev~='depause'and SCN.prev~='pause'then
|
||||
trigGameRate,gameRate=0,1
|
||||
elseif not replaying then
|
||||
if GAME.tasUsed then
|
||||
|
||||
@@ -28,9 +28,9 @@ local touchDist
|
||||
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit(org)
|
||||
function scene.sceneInit()
|
||||
BG.set()
|
||||
mapCam.zoomK=org=='main'and 5 or 1
|
||||
mapCam.zoomK=SCN.prev=='main'and 5 or 1
|
||||
visibleModes={}--1=unlocked, 2=locked but visible
|
||||
for name,M in next,MODES do
|
||||
if RANKS[name]and M.x then
|
||||
|
||||
@@ -57,7 +57,7 @@ end
|
||||
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit(org)
|
||||
function scene.sceneInit()
|
||||
textBox.hide=true
|
||||
textBox:clear()
|
||||
inputBox.hide=true
|
||||
@@ -68,7 +68,7 @@ function scene.sceneInit(org)
|
||||
upstreamProgress=1
|
||||
newMessageTimer=0
|
||||
|
||||
if org=='setting_game'then
|
||||
if SCN.prev=='setting_game'then
|
||||
NET.changeConfig()
|
||||
end
|
||||
if GAME.prevBG then
|
||||
|
||||
@@ -17,15 +17,15 @@ local rank--Current rank
|
||||
local trophy--Current trophy
|
||||
local trophyColor--Current trophy color
|
||||
|
||||
function scene.sceneInit(org)
|
||||
function scene.sceneInit()
|
||||
page=0
|
||||
if org:find("setting")then
|
||||
if SCN.prev:find("setting")then
|
||||
TEXT.show(text.needRestart,640,410,50,'fly',.6)
|
||||
end
|
||||
local P1=PLAYERS[1]
|
||||
local S=P1.stat
|
||||
|
||||
timer1=org=='game'and 0 or 50
|
||||
timer1=SCN.prev=='game'and 0 or 50
|
||||
timer2=timer1
|
||||
|
||||
local frameLostRate=(S.frame/S.time/60-1)*100
|
||||
|
||||
Reference in New Issue
Block a user