框架跟进

推进中途加入房间的观战相关
This commit is contained in:
MrZ_26
2022-11-03 12:23:29 +08:00
parent e688458cfd
commit 9e882e6188
7 changed files with 41 additions and 15 deletions

View File

@@ -60,11 +60,11 @@ BGM.setMaxSources(5)
VOC.setDiversion(.62)
WIDGET.setOnChange(function()
if SCN.stack[#SCN.stack]~='custom_field' then
if SCN.current~='custom_field' then
local colorList=THEME.getThemeColor()
if not colorList then return end
local rnd=math.random
for _,W in next,SCN.scenes[SCN.stack[#SCN.stack]].widgetList do
for _,W in next,SCN.scenes[SCN.current].widgetList do
if W.color then
W.color=colorList[rnd(#colorList)]
end
@@ -218,10 +218,10 @@ do-- Z.setOnFocus
TASK.new(task_autoSoundOn)
end
else
if SCN.stack[#SCN.stack]=='game' and SETTING.autoPause then
if SCN.current=='game' and SETTING.autoPause then
pauseGame()
end
if SETTING.autoMute and SCN.stack[#SCN.stack]~='music' then
if SETTING.autoMute and SCN.current~='music' then
TASK.removeTask_code(task_autoSoundOn)
TASK.new(task_autoSoundOff)
end