From d4060e4d57e8e88049573fb429ad2af8809e706e Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Sat, 13 Jul 2024 02:33:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=9A=82=E5=81=9C=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=9C=A8=E9=9C=80=E8=A6=81=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99unload=E6=B8=B8=E6=88=8F=E6=95=B0=E6=8D=AE=20=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E8=B7=9F=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zenitha | 2 +- assets/scene/game_in.lua | 5 +++++ assets/scene/game_out.lua | 5 +++++ assets/scene/pause_in.lua | 5 ++++- assets/scene/pause_out.lua | 3 +++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Zenitha b/Zenitha index d0955678..f9cc9b86 160000 --- a/Zenitha +++ b/Zenitha @@ -1 +1 @@ -Subproject commit d09556783a3a50b6009bab352e0ccce0feec3158 +Subproject commit f9cc9b86b27f48dfbd1f9ce0c30b807f595641d1 diff --git a/assets/scene/game_in.lua b/assets/scene/game_in.lua index bd7688f3..48fef284 100644 --- a/assets/scene/game_in.lua +++ b/assets/scene/game_in.lua @@ -16,6 +16,11 @@ function scene.load() scene.widgetList.pause.text=canPause() and CHAR.icon.pause or CHAR.icon.back WIDGET._reset() end +function scene.unload() + if SCN.state.target~='pause_in' then + GAME.unload() + end +end local function sysAction(action) if action=='restart' then diff --git a/assets/scene/game_out.lua b/assets/scene/game_out.lua index 7f4b9c0f..f716afaf 100644 --- a/assets/scene/game_out.lua +++ b/assets/scene/game_out.lua @@ -20,6 +20,11 @@ function scene.load() scene.widgetList.pause.text=canPause() and CHAR.icon.pause or CHAR.icon.back WIDGET._reset() end +function scene.unload() + if SCN.state.target~='pause_out' then + GAME.unload() + end +end local function sysAction(action) if action=='restart' then diff --git a/assets/scene/pause_in.lua b/assets/scene/pause_in.lua index a5b2d5d6..a1d3d27c 100644 --- a/assets/scene/pause_in.lua +++ b/assets/scene/pause_in.lua @@ -4,7 +4,7 @@ local scene={} local pauseText local function fuse() - repeat DEBUG.yieldT(6.26) until SCN.cur~='pause_out' + repeat DEBUG.yieldT(6.26) until SCN.cur~='pause_in' FMOD.effect.keyOff('music_pause') end @@ -16,6 +16,9 @@ function scene.load() end function scene.unload() FMOD.effect.keyOff('music_pause') + if not (SCN.state.target=='setting_in' or SCN.state.target=='game_in') then + GAME.unload() + end end local function sysAction(action) diff --git a/assets/scene/pause_out.lua b/assets/scene/pause_out.lua index 62f101c7..ad644098 100644 --- a/assets/scene/pause_out.lua +++ b/assets/scene/pause_out.lua @@ -21,6 +21,9 @@ function scene.load() end function scene.unload() FMOD.effect.keyOff('music_pause') + if not (SCN.state.target=='setting_out' or SCN.state.target=='game_out') then + GAME.unload() + end end local function sysAction(action)