From 27baab2f5740ea1882abcaa646c0d61a5311d986 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 28 Dec 2020 22:13:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/background.lua | 8 ++++---- main.lua | 2 +- parts/scenes/main.lua | 5 +---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Zframework/background.lua b/Zframework/background.lua index acfe88c3..c9b865ba 100644 --- a/Zframework/background.lua +++ b/Zframework/background.lua @@ -7,7 +7,7 @@ local BGlist={ } local BG={ cur="none", - defaultBG="none", + default="none", init=false, resize=false, update=NULL, @@ -24,12 +24,12 @@ function BG.send(...) BG.event(...) end end -function BG.setDefaultBG(bg) - defaultBG=bg +function BG.setDefault(bg) + BG.default=bg end function BG.set(background) if not background then - background=defaultBG + background=BG.default end if background==BG.cur or not SETTING.bg then return end BG.discard() diff --git a/main.lua b/main.lua index 403cbaf0..2989cf7a 100644 --- a/main.lua +++ b/main.lua @@ -353,4 +353,4 @@ do end end -BG.setDefaultBG(FESTIVAL=="Xmas"and"snow"or"space") \ No newline at end of file +BG.setDefault(FESTIVAL=="Xmas"and"snow"or"space") diff --git a/parts/scenes/main.lua b/parts/scenes/main.lua index 6c1bec50..39a94e79 100644 --- a/parts/scenes/main.lua +++ b/parts/scenes/main.lua @@ -45,10 +45,7 @@ local tip function scene.sceneInit() tip=text.getTip() - BG.set( - FESTIVAL=="Xmas"and"snow"or - "space" - ) + BG.set() GAME.modeEnv=NONE --Create demo player