THEME做成独立模块
This commit is contained in:
@@ -470,30 +470,13 @@ function commands.setbg(name)
|
||||
end
|
||||
end
|
||||
function commands.theme(name)
|
||||
if name=="classic"then
|
||||
THEME=false
|
||||
BG.setDefault("space")
|
||||
BGM.setDefault("blank")
|
||||
BGM.play()
|
||||
elseif name=="xmas"then
|
||||
THEME="xMas"
|
||||
BG.setDefault("snow")
|
||||
BGM.setDefault("mXmas")
|
||||
BGM.play()
|
||||
elseif name=="sprfes"then
|
||||
THEME="sprFes"
|
||||
BG.setDefault("firework")
|
||||
BGM.setDefault("spring festival")
|
||||
BGM.play()
|
||||
elseif name=="zday"then
|
||||
THEME="zDay"
|
||||
BG.setDefault("lanterns")
|
||||
BGM.setDefault("overzero")
|
||||
BGM.play()
|
||||
else
|
||||
if name~=""then
|
||||
if name~=""then
|
||||
if THEME.set(name)then
|
||||
log("Theme set to: "..name)
|
||||
else
|
||||
log("No theme called "..name)
|
||||
end
|
||||
else
|
||||
log{C.water,"Usage: theme [themeName]"}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,8 +8,6 @@ local scene={}
|
||||
local t1,t2,animateType
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set()
|
||||
BGM.play()
|
||||
t1,t2=0,0--Timer
|
||||
animateType={rnd(5),rnd(5),rnd(5),rnd(5),rnd(5),rnd(5),rnd(5),rnd(5)}--Random animation type
|
||||
end
|
||||
|
||||
@@ -182,15 +182,7 @@ local loadingThread=coroutine.create(function()
|
||||
authToken=USER.authToken,
|
||||
})
|
||||
]]
|
||||
if THEME=="Xmas"then
|
||||
LOG.print("==============",COLOR.red)
|
||||
LOG.print("Merry Christmas!",COLOR.white)
|
||||
LOG.print("==============",COLOR.red)
|
||||
elseif THEME=="sprFes"then
|
||||
LOG.print(" ★☆☆★",COLOR.red)
|
||||
LOG.print("新年快乐!",COLOR.white)
|
||||
LOG.print(" ★☆☆★",COLOR.red)
|
||||
end
|
||||
THEME.fresh()
|
||||
while true do
|
||||
if math.random()<.126 then
|
||||
upFloor()
|
||||
|
||||
Reference in New Issue
Block a user