微调LOG.print使用

This commit is contained in:
MrZ626
2020-09-17 20:49:08 +08:00
parent 43874a09db
commit d47629e64a
6 changed files with 12 additions and 8 deletions

View File

@@ -430,6 +430,10 @@ function BG.set(bg,data)
BG.discard()
collectgarbage()
end
if not back[bg]then
LOG.print("No BG called"..bg,"warn")
return
end
BG.cur=bg
bg=back[bg]

View File

@@ -41,7 +41,7 @@ function BGM.loadOne(N)
BGM.list[N]:setLooping(true)
BGM.list[N]:setVolume(0)
else
LOG.print("No BGM file: "..N,color.red)
LOG.print("No BGM file: "..N,"warn")
end
end
function BGM.loadAll()

View File

@@ -43,7 +43,7 @@ function LOG.draw()
end
end
end
function LOG.print(text,T,C)--type/time,color
function LOG.print(text,T,C)--text,type/time,color
local time
local his
if T=="warn"then

View File

@@ -30,7 +30,7 @@ function SFX.loadOne(_)
if love.filesystem.getInfo(N)then
SFX.list[_]={love.audio.newSource(N,"static")}
else
LOG.print("No SFX file: "..N,color.red)
LOG.print("No SFX file: "..N,"warn")
end
end
function SFX.loadAll()