整理几个全局变量
This commit is contained in:
@@ -161,7 +161,7 @@ local Widgets={
|
||||
newButton({name="lang", x=150,y=590,w=200,h=80,color="lGreen", font=45,code=goScene("setting_lang")}),
|
||||
newButton({name="music", x=370,y=590,w=200,h=80,color="lPurple", font=30,code=goScene("music")}),
|
||||
newButton({name="quit", x=590,y=590,w=200,h=80,color="lGrey", font=45,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end}),
|
||||
newKey({name="account", x=150,y=670,w=200,h=60,color="dRed", code=goScene("account")}),
|
||||
newKey({name="account", x=150,y=670,w=200,h=60,color="red", code=function()SCN.go(LOGIN and"account"or"login")end}),
|
||||
newKey({name="minigame", x=370,y=670,w=200,h=60,color="grey", code=goScene("minigame")}),
|
||||
},
|
||||
mode={
|
||||
|
||||
4
main.lua
4
main.lua
@@ -11,8 +11,10 @@
|
||||
--?
|
||||
function NULL()end
|
||||
DBP=print--use this if need debugging print
|
||||
marking=true
|
||||
MARKING=true
|
||||
LOADED=false
|
||||
NOGAME=false
|
||||
LOGIN=false
|
||||
|
||||
--Global Setting & Vars
|
||||
math.randomseed(os.time()*626)
|
||||
|
||||
@@ -2715,7 +2715,7 @@ function player.win(P,result)
|
||||
if P.human then
|
||||
gameOver()
|
||||
TASK.new(TICK.autoPause,{0})
|
||||
if marking then
|
||||
if MARKING then
|
||||
P:showTextF(text.marking,0,-226,25,"appear",.4,.0626)
|
||||
end
|
||||
end
|
||||
@@ -2820,7 +2820,7 @@ function player.lose(P)
|
||||
gameOver()
|
||||
P:newTask(#players>1 and TICK.lose or TICK.finish)
|
||||
TASK.new(TICK.autoPause,{0})
|
||||
if marking then
|
||||
if MARKING then
|
||||
P:showTextF(text.marking,0,-226,25,"appear",.4,.0626)
|
||||
end
|
||||
else
|
||||
|
||||
@@ -112,7 +112,7 @@ do--calculator
|
||||
local v=tonumber(S.val)
|
||||
if v==600+26 then S.pass=true
|
||||
elseif v==190000+6022 then
|
||||
S.pass,marking=true
|
||||
S.pass,MARKING=true
|
||||
LOG.print("\68\69\86\58\87\97\116\101\114\109\97\114\107\32\82\101\109\111\118\101\100","message")
|
||||
SFX.play("clear")
|
||||
elseif v==72943816 then
|
||||
@@ -180,7 +180,7 @@ do--load
|
||||
if k=="a"then
|
||||
sceneTemp.skip=true
|
||||
elseif k=="s"then
|
||||
sceneTemp.skip,marking=true
|
||||
sceneTemp.skip,MARKING=true
|
||||
elseif k=="escape"then
|
||||
SCN.back()
|
||||
end
|
||||
@@ -1681,7 +1681,7 @@ do--play
|
||||
end
|
||||
end
|
||||
function Pnt.play()
|
||||
if marking then
|
||||
if MARKING then
|
||||
setFont(26)
|
||||
local t=Timer()
|
||||
gc.setColor(1,1,1,.2+.1*(sin(3*t)+sin(2.6*t)))
|
||||
@@ -2770,6 +2770,18 @@ do--stat
|
||||
gc.draw(IMG.title,260,615,.2+.04*sin(Timer()*3),nil,nil,206,35)
|
||||
end
|
||||
end
|
||||
do--login
|
||||
function Pnt.login()
|
||||
local S=sceneTemp
|
||||
|
||||
end
|
||||
end
|
||||
do--account
|
||||
function Pnt.account()
|
||||
local S=sceneTemp
|
||||
|
||||
end
|
||||
end
|
||||
do--minigame
|
||||
function sceneInit.minigame()
|
||||
BG.set("space")
|
||||
|
||||
Reference in New Issue
Block a user