背景系统微调,初始强制加载none背景

This commit is contained in:
MrZ626
2020-11-12 00:47:12 +08:00
parent 18b7448da8
commit 55414b061c
3 changed files with 11 additions and 12 deletions

View File

@@ -1,10 +1,16 @@
local BGlist={}
local BGlist={
none={
draw=function()
love.graphics.clear(.15,.15,.15)
end
}
}
local BG={
cur="",
cur="none",
init=nil,
resize=nil,
update=NULL,
draw=NULL,
draw=BGlist.none.draw,
event=nil,
discard=NULL,
}
@@ -17,8 +23,8 @@ function BG.send(...)
BG.event(...)
end
end
function BG.set(background,force)
if background==BG.cur or not(SETTING.bg or force)then return end
function BG.set(background)
if background==BG.cur or not SETTING.bg then return end
BG.discard()
background=BGlist[background]
if not background then