整理几个全局变量
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="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="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}),
|
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")}),
|
newKey({name="minigame", x=370,y=670,w=200,h=60,color="grey", code=goScene("minigame")}),
|
||||||
},
|
},
|
||||||
mode={
|
mode={
|
||||||
|
|||||||
4
main.lua
4
main.lua
@@ -11,8 +11,10 @@
|
|||||||
--?
|
--?
|
||||||
function NULL()end
|
function NULL()end
|
||||||
DBP=print--use this if need debugging print
|
DBP=print--use this if need debugging print
|
||||||
marking=true
|
MARKING=true
|
||||||
|
LOADED=false
|
||||||
NOGAME=false
|
NOGAME=false
|
||||||
|
LOGIN=false
|
||||||
|
|
||||||
--Global Setting & Vars
|
--Global Setting & Vars
|
||||||
math.randomseed(os.time()*626)
|
math.randomseed(os.time()*626)
|
||||||
|
|||||||
@@ -2715,7 +2715,7 @@ function player.win(P,result)
|
|||||||
if P.human then
|
if P.human then
|
||||||
gameOver()
|
gameOver()
|
||||||
TASK.new(TICK.autoPause,{0})
|
TASK.new(TICK.autoPause,{0})
|
||||||
if marking then
|
if MARKING then
|
||||||
P:showTextF(text.marking,0,-226,25,"appear",.4,.0626)
|
P:showTextF(text.marking,0,-226,25,"appear",.4,.0626)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -2820,7 +2820,7 @@ function player.lose(P)
|
|||||||
gameOver()
|
gameOver()
|
||||||
P:newTask(#players>1 and TICK.lose or TICK.finish)
|
P:newTask(#players>1 and TICK.lose or TICK.finish)
|
||||||
TASK.new(TICK.autoPause,{0})
|
TASK.new(TICK.autoPause,{0})
|
||||||
if marking then
|
if MARKING then
|
||||||
P:showTextF(text.marking,0,-226,25,"appear",.4,.0626)
|
P:showTextF(text.marking,0,-226,25,"appear",.4,.0626)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ do--calculator
|
|||||||
local v=tonumber(S.val)
|
local v=tonumber(S.val)
|
||||||
if v==600+26 then S.pass=true
|
if v==600+26 then S.pass=true
|
||||||
elseif v==190000+6022 then
|
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")
|
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")
|
SFX.play("clear")
|
||||||
elseif v==72943816 then
|
elseif v==72943816 then
|
||||||
@@ -180,7 +180,7 @@ do--load
|
|||||||
if k=="a"then
|
if k=="a"then
|
||||||
sceneTemp.skip=true
|
sceneTemp.skip=true
|
||||||
elseif k=="s"then
|
elseif k=="s"then
|
||||||
sceneTemp.skip,marking=true
|
sceneTemp.skip,MARKING=true
|
||||||
elseif k=="escape"then
|
elseif k=="escape"then
|
||||||
SCN.back()
|
SCN.back()
|
||||||
end
|
end
|
||||||
@@ -1681,7 +1681,7 @@ do--play
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Pnt.play()
|
function Pnt.play()
|
||||||
if marking then
|
if MARKING then
|
||||||
setFont(26)
|
setFont(26)
|
||||||
local t=Timer()
|
local t=Timer()
|
||||||
gc.setColor(1,1,1,.2+.1*(sin(3*t)+sin(2.6*t)))
|
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)
|
gc.draw(IMG.title,260,615,.2+.04*sin(Timer()*3),nil,nil,206,35)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
do--login
|
||||||
|
function Pnt.login()
|
||||||
|
local S=sceneTemp
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
do--account
|
||||||
|
function Pnt.account()
|
||||||
|
local S=sceneTemp
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
do--minigame
|
do--minigame
|
||||||
function sceneInit.minigame()
|
function sceneInit.minigame()
|
||||||
BG.set("space")
|
BG.set("space")
|
||||||
|
|||||||
Reference in New Issue
Block a user