优化GAME.prevBG的使用,同时应用于联网游戏场景,修复从设置返回后背景变化问题
This commit is contained in:
@@ -26,6 +26,7 @@ local function _setReady()NET.signal_setMode(1)end
|
||||
local function _setSpectate()NET.signal_setMode(2)end
|
||||
local function _gotoSetting()
|
||||
if not(netPLY.getSelfReady()or NET.getlock('ready'))then
|
||||
GAME.prevBG=BG.cur
|
||||
SCN.go('setting_game')
|
||||
end
|
||||
end
|
||||
@@ -63,6 +64,10 @@ function scene.sceneInit(org)
|
||||
newMessageTimer=0
|
||||
|
||||
if org=='setting_game'then NET.changeConfig()end
|
||||
if GAME.prevBG then
|
||||
BG.set(GAME.prevBG)
|
||||
GAME.prevBG=false
|
||||
end
|
||||
if NET.specSRID then
|
||||
NET.wsconn_stream(NET.specSRID)
|
||||
NET.specSRID=false
|
||||
|
||||
@@ -113,8 +113,9 @@ function scene.sceneInit(org)
|
||||
else
|
||||
rank,trophy=nil
|
||||
end
|
||||
if org~="game"and GAME.prevBG then
|
||||
if GAME.prevBG then
|
||||
BG.set(GAME.prevBG)
|
||||
GAME.prevBG=false
|
||||
end
|
||||
end
|
||||
function scene.sceneBack()
|
||||
|
||||
Reference in New Issue
Block a user