整理代码习惯,常量字符串改用单引号,可能有遗漏
This commit is contained in:
@@ -13,7 +13,7 @@ function scene.draw()
|
||||
setFont(20)
|
||||
gc.setColor(1,1,1)
|
||||
for i=1,#text.help do
|
||||
gc.printf(text.help[i],150,35*i+40,1000,"center")
|
||||
gc.printf(text.help[i],150,35*i+40,1000,'center')
|
||||
end
|
||||
|
||||
--Lib used
|
||||
@@ -24,8 +24,8 @@ function scene.draw()
|
||||
--Sponsor code
|
||||
gc.draw(TEXTURE.title,280,610,.1,.4+.03*sin(t*2.6),nil,580,118)
|
||||
gc.setLineWidth(3)
|
||||
gc.rectangle("line",18,18,263,263)
|
||||
gc.rectangle("line",1012,18,250,250)
|
||||
gc.rectangle('line',18,18,263,263)
|
||||
gc.rectangle('line',1012,18,250,250)
|
||||
|
||||
--Group code
|
||||
setFont(20)
|
||||
|
||||
@@ -7,7 +7,7 @@ function scene.sceneInit()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title",x=80,y=50,font=70,align="L"},
|
||||
WIDGET.newText{name="title",x=80,y=50,font=70,align='L'},
|
||||
WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ local color,blind
|
||||
local slide,pathVis,revKB
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("rainbow2")
|
||||
BGM.play("push")
|
||||
BG.set('rainbow2')
|
||||
BGM.play('push')
|
||||
board={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}}
|
||||
cx,cy=4,4
|
||||
startTime=0
|
||||
@@ -127,10 +127,10 @@ local function tapBoard(x,y,key)
|
||||
elseif time<60 then LOG.print("多加练习",COLOR.lB)
|
||||
else LOG.print("第一次玩?加油",COLOR.lB)
|
||||
end
|
||||
SFX.play("win")
|
||||
SFX.play('win')
|
||||
return
|
||||
end
|
||||
SFX.play("move")
|
||||
SFX.play('move')
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -274,7 +274,7 @@ function scene.draw()
|
||||
if state==2 then
|
||||
--Draw no-setting area
|
||||
gc.setColor(1,0,0,.3)
|
||||
gc.rectangle("fill",15,295,285,340)
|
||||
gc.rectangle('fill',15,295,285,340)
|
||||
|
||||
gc.setColor(.9,.9,0)--win
|
||||
elseif state==1 then
|
||||
@@ -283,7 +283,7 @@ function scene.draw()
|
||||
gc.setColor(.2,.8,.2)--ready
|
||||
end
|
||||
gc.setLineWidth(10)
|
||||
gc.rectangle("line",313,33,654,654,18)
|
||||
gc.rectangle('line',313,33,654,654,18)
|
||||
|
||||
gc.setLineWidth(4)
|
||||
local mono=blind and state==1
|
||||
@@ -295,9 +295,9 @@ function scene.draw()
|
||||
local C=mono and 3 or color
|
||||
|
||||
gc.setColor(backColor[C][N])
|
||||
gc.rectangle("fill",j*160+163,i*160-117,154,154,8)
|
||||
gc.rectangle('fill',j*160+163,i*160-117,154,154,8)
|
||||
gc.setColor(frontColor[C][N])
|
||||
gc.rectangle("line",j*160+163,i*160-117,154,154,8)
|
||||
gc.rectangle('line',j*160+163,i*160-117,154,154,8)
|
||||
if not mono then
|
||||
gc.setColor(.1,.1,.1)
|
||||
mStr(N,j*160+240,i*160-96)
|
||||
@@ -310,12 +310,12 @@ function scene.draw()
|
||||
end
|
||||
gc.setColor(0,0,0,.3)
|
||||
gc.setLineWidth(10)
|
||||
gc.rectangle("line",cx*160+173,cy*160-107,134,134,50)
|
||||
gc.rectangle('line',cx*160+173,cy*160-107,134,134,50)
|
||||
end
|
||||
|
||||
local function Gaming()return state==1 end
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lG", font=40,code=pressKey"space"},
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color='lG', font=40,code=pressKey"space"},
|
||||
WIDGET.newSlider{name="color", x=110,y=250,w=170,unit=4,show=false,font=30,disp=function()return color end, code=function(v)if state~=1 then color=v end end,hide=Gaming},
|
||||
WIDGET.newSwitch{name="blind", x=240,y=330,w=60, font=40,disp=function()return blind end, code=pressKey"w", hide=Gaming},
|
||||
WIDGET.newSwitch{name="slide", x=240,y=420,w=60, font=40,disp=function()return slide end, code=pressKey"e", hide=Gaming},
|
||||
|
||||
@@ -82,7 +82,7 @@ local function newTile()
|
||||
|
||||
--Fresh score
|
||||
score=score+2^nextTile
|
||||
TEXT.show("+"..2^nextTile,1130+rnd(-60,60),575+rnd(-30,30),30,"score",1.5)
|
||||
TEXT.show("+"..2^nextTile,1130+rnd(-60,60),575+rnd(-30,30),30,'score',1.5)
|
||||
|
||||
--Generate next number
|
||||
nextCD=nextCD-1
|
||||
@@ -114,12 +114,12 @@ local function newTile()
|
||||
|
||||
--Die.
|
||||
state=2
|
||||
SFX.play(maxTile>=10 and"win"or"fail")
|
||||
SFX.play(maxTile>=10 and'win'or'fail')
|
||||
end
|
||||
local function freshMaxTile()
|
||||
maxTile=maxTile+1
|
||||
if maxTile==12 then skipper.cd=0 end
|
||||
SFX.play("reach")
|
||||
SFX.play('reach')
|
||||
ins(progress,("%s - %.3fs"):format(tileName[maxTile],TIME()-startTime))
|
||||
end
|
||||
local function squash(L)
|
||||
@@ -216,16 +216,16 @@ local function skip()
|
||||
skipper.cd=1024
|
||||
skipper.used=true
|
||||
newTile()
|
||||
SFX.play("hold")
|
||||
SFX.play('hold')
|
||||
else
|
||||
SFX.play("finesseError")
|
||||
SFX.play('finesseError')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("cubes")
|
||||
BGM.play("truth")
|
||||
BG.set('cubes')
|
||||
BGM.play('truth')
|
||||
board={}
|
||||
|
||||
blind=false
|
||||
@@ -305,14 +305,14 @@ function scene.keyDown(key,auto)
|
||||
if skipper.cd and skipper.cd>0 then
|
||||
skipper.cd=skipper.cd-1
|
||||
if skipper.cd==0 then
|
||||
SFX.play("spin_0")
|
||||
SFX.play('spin_0')
|
||||
end
|
||||
end
|
||||
newTile()
|
||||
TEXT.show(arrows[key],640,360,80,"beat",3)
|
||||
TEXT.show(arrows[key],640,360,80,'beat',3)
|
||||
move=move+1
|
||||
if not auto then
|
||||
SFX.play("move")
|
||||
SFX.play('move')
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -365,15 +365,15 @@ function scene.draw()
|
||||
setColor(COLOR[
|
||||
repeater.focus==i and(
|
||||
TIME()%.5>.25 and
|
||||
"R"or
|
||||
"Y"
|
||||
'R'or
|
||||
'Y'
|
||||
)or(
|
||||
repeater.seq[i]==repeater.last[i]and
|
||||
"H"or
|
||||
"Z"
|
||||
'H'or
|
||||
'Z'
|
||||
)
|
||||
])
|
||||
rectangle("line",990,305+60*i,220,50)
|
||||
rectangle('line',990,305+60*i,220,50)
|
||||
gc.print(repeater.seq[i],1000,313+60*i)
|
||||
end
|
||||
|
||||
@@ -386,7 +386,7 @@ function scene.draw()
|
||||
if state==2 then
|
||||
--Draw no-setting area
|
||||
setColor(1,0,0,.3)
|
||||
rectangle("fill",15,265,285,140)
|
||||
rectangle('fill',15,265,285,140)
|
||||
|
||||
setColor(.9,.9,0)--win
|
||||
elseif state==1 then
|
||||
@@ -395,7 +395,7 @@ function scene.draw()
|
||||
setColor(.2,.8,.2)--ready
|
||||
end
|
||||
gc.setLineWidth(10)
|
||||
rectangle("line",310,30,660,660)
|
||||
rectangle('line',310,30,660,660)
|
||||
|
||||
--Board
|
||||
for i=1,16 do
|
||||
@@ -405,7 +405,7 @@ function scene.draw()
|
||||
if i~=prevPos or prevSpawnTime==1 then
|
||||
if not blind or i==prevPos then
|
||||
setColor(tileColor[N]or COLOR.D)
|
||||
rectangle("fill",x*160+163,y*160-117,154,154,15)
|
||||
rectangle('fill',x*160+163,y*160-117,154,154,15)
|
||||
if N>=0 then
|
||||
setColor(N<3 and COLOR.D or COLOR.Z)
|
||||
local fontSize=tileFont[N]
|
||||
@@ -414,12 +414,12 @@ function scene.draw()
|
||||
end
|
||||
else
|
||||
setColor(COLOR.H)
|
||||
rectangle("fill",x*160+163,y*160-117,154,154,15)
|
||||
rectangle('fill',x*160+163,y*160-117,154,154,15)
|
||||
end
|
||||
else
|
||||
local c=tileColor[N]
|
||||
setColor(c[1],c[2],c[3],prevSpawnTime)
|
||||
rectangle("fill",x*160+163,y*160-117,154,154,15)
|
||||
rectangle('fill',x*160+163,y*160-117,154,154,15)
|
||||
c=N<3 and 0 or 1
|
||||
setColor(c,c,c,prevSpawnTime)
|
||||
local fontSize=tileFont[N]
|
||||
@@ -433,7 +433,7 @@ function scene.draw()
|
||||
setColor(1,1,1)
|
||||
if nextCD<=12 then
|
||||
for i=1,nextCD do
|
||||
rectangle("fill",140+i*16-nextCD*8,170,12,12)
|
||||
rectangle('fill',140+i*16-nextCD*8,170,12,12)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -456,7 +456,7 @@ function scene.draw()
|
||||
--Skip mark
|
||||
if skipper.used then
|
||||
setColor(1,1,.5)
|
||||
gc.circle("fill",280,675,10)
|
||||
gc.circle('fill',280,675,10)
|
||||
end
|
||||
|
||||
--New tile position
|
||||
@@ -464,7 +464,7 @@ function scene.draw()
|
||||
gc.setLineWidth(8)
|
||||
setColor(.2,.8,0,prevSpawnTime)
|
||||
local d=25-prevSpawnTime*25
|
||||
rectangle("line",x*160+163-d,y*160-117-d,154+2*d,154+2*d,15)
|
||||
rectangle('line',x*160+163-d,y*160-117-d,154+2*d,154+2*d,15)
|
||||
|
||||
--Touch control boarder line
|
||||
if tapControl then
|
||||
@@ -474,24 +474,24 @@ function scene.draw()
|
||||
gc.line(970,30,700,300)
|
||||
gc.line(310,690,580,420)
|
||||
gc.line(970,690,700,420)
|
||||
rectangle("line",580,300,120,120,10)
|
||||
rectangle('line',580,300,120,120,10)
|
||||
end
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="reset", x=155,y=100,w=180,h=100,color="lG",font=40,code=pressKey"r"},
|
||||
WIDGET.newButton{name="reset", x=155,y=100,w=180,h=100,color='lG',font=40,code=pressKey"r"},
|
||||
WIDGET.newSwitch{name="blind", x=240,y=300,w=60,font=40,disp=function()return blind end,code=pressKey"q",hide=function()return state==1 end},
|
||||
WIDGET.newSwitch{name="tapControl", x=240,y=370,w=60,font=40,disp=function()return tapControl end,code=pressKey"w",hide=function()return state==1 end},
|
||||
|
||||
WIDGET.newKey{name="up", x=155,y=460,w=100,fText="↑",font=50,color="Y",code=pressKey"up",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="down", x=155,y=660,w=100,fText="↓",font=50,color="Y",code=pressKey"down",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="left", x=55,y=560,w=100,fText="←",font=50,color="Y",code=pressKey"left",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="right", x=255,y=560,w=100,fText="→",font=50,color="Y",code=pressKey"right",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="skip", x=155,y=400,w=100,font=20, color="Y",code=pressKey"space",hide=function()return state~=1 or not skipper.cd or skipper.cd>0 end},
|
||||
WIDGET.newKey{name="record1", x=1100,y=390,w=220,h=50,fText="", color="H",code=pressKey"1",hide=function()return state==2 end},
|
||||
WIDGET.newKey{name="record2", x=1100,y=450,w=220,h=50,fText="", color="H",code=pressKey"2",hide=function()return state==2 end},
|
||||
WIDGET.newKey{name="replay1", x=1245,y=390,w=50,fText="!", color="G",code=pressKey"c1",hide=function()return state==2 or #repeater.seq[1]==0 end},
|
||||
WIDGET.newKey{name="replay2", x=1245,y=450,w=50,fText="!", color="G",code=pressKey"c2",hide=function()return state==2 or #repeater.seq[2]==0 end},
|
||||
WIDGET.newKey{name="up", x=155,y=460,w=100,fText="↑",font=50,color='Y',code=pressKey"up",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="down", x=155,y=660,w=100,fText="↓",font=50,color='Y',code=pressKey"down",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="left", x=55,y=560,w=100,fText="←",font=50,color='Y',code=pressKey"left",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="right", x=255,y=560,w=100,fText="→",font=50,color='Y',code=pressKey"right",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="skip", x=155,y=400,w=100,font=20, color='Y',code=pressKey"space",hide=function()return state~=1 or not skipper.cd or skipper.cd>0 end},
|
||||
WIDGET.newKey{name="record1", x=1100,y=390,w=220,h=50,fText="", color='H',code=pressKey"1",hide=function()return state==2 end},
|
||||
WIDGET.newKey{name="record2", x=1100,y=450,w=220,h=50,fText="", color='H',code=pressKey"2",hide=function()return state==2 end},
|
||||
WIDGET.newKey{name="replay1", x=1245,y=390,w=50,fText="!", color='G',code=pressKey"c1",hide=function()return state==2 or #repeater.seq[1]==0 end},
|
||||
WIDGET.newKey{name="replay2", x=1245,y=450,w=50,fText="!", color='G',code=pressKey"c2",hide=function()return state==2 or #repeater.seq[2]==0 end},
|
||||
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ local state,progress
|
||||
local frameKeyCount,mistake
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("bg2")
|
||||
BGM.play("way")
|
||||
BG.set('bg2')
|
||||
BGM.play('way')
|
||||
levelName="A_Z"
|
||||
targetString=levels.A_Z
|
||||
progress=1
|
||||
@@ -53,19 +53,19 @@ function scene.keyDown(key)
|
||||
if key:upper():byte()==targetString:byte(progress)then
|
||||
progress=progress+1
|
||||
frameKeyCount=frameKeyCount+1
|
||||
TEXT.show(key:upper(),rnd(320,960),rnd(100,240),90,"score",2.6)
|
||||
SFX.play("move")
|
||||
TEXT.show(key:upper(),rnd(320,960),rnd(100,240),90,'score',2.6)
|
||||
SFX.play('move')
|
||||
if progress==2 then
|
||||
state=1
|
||||
startTime=TIME()
|
||||
elseif progress>#targetString then
|
||||
time=TIME()-startTime
|
||||
state=2
|
||||
SFX.play("reach")
|
||||
SFX.play('reach')
|
||||
end
|
||||
elseif progress>1 then
|
||||
mistake=mistake+1
|
||||
SFX.play("finesseError")
|
||||
SFX.play('finesseError')
|
||||
end
|
||||
end
|
||||
elseif key=="space"then
|
||||
@@ -116,8 +116,8 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newSelector{name="level", x=640,y=640,w=200,list={"A_Z","Z_A","Tech1","Tech2","KeyTest1","KeyTest2","Hello","Roll1","Roll2","Roll3","ZZZ","ZXZX","ZMZM","Stair","Stair2","Stair3","BPW"},disp=function()return levelName end,code=function(i)levelName=i;targetString=levels[i]end,hide=function()return state>0 end},
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lG",font=40,code=pressKey"space"},
|
||||
WIDGET.newSelector{name="level", x=640,y=640,w=200,list={'A_Z','Z_A','Tech1','Tech2','KeyTest1','KeyTest2','Hello','Roll1','Roll2','Roll3','ZZZ','ZXZX','ZMZM','Stair','Stair2','Stair3','BPW'},disp=function()return levelName end,code=function(i)levelName=i;targetString=levels[i]end,hide=function()return state>0 end},
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color='lG',font=40,code=pressKey"space"},
|
||||
WIDGET.newButton{name="keyboard", x=160,y=210,w=180,h=100,code=function()love.keyboard.setTextInput(true,0,select(2,SCR.xOy:transformPoint(0,500)),1,1)end,hide=not MOBILE},
|
||||
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ local function full(L)
|
||||
end
|
||||
local function place(X,x)
|
||||
board[X][x]=round
|
||||
SFX.play("move")
|
||||
SFX.play('move')
|
||||
lastX,lastx=X,x
|
||||
curX,curx=nil
|
||||
placeTime=TIME()
|
||||
@@ -65,7 +65,7 @@ local function place(X,x)
|
||||
score[X]=round
|
||||
if checkBoard(score,round)then
|
||||
gameover=round
|
||||
SFX.play("win")
|
||||
SFX.play('win')
|
||||
return
|
||||
else
|
||||
if full(score)then
|
||||
@@ -73,10 +73,10 @@ local function place(X,x)
|
||||
return
|
||||
end
|
||||
end
|
||||
SFX.play("reach")
|
||||
SFX.play('reach')
|
||||
else
|
||||
if full(board[X])then
|
||||
SFX.play("emit")
|
||||
SFX.play('emit')
|
||||
score[X]=true
|
||||
if full(score)then
|
||||
gameover=true
|
||||
@@ -96,32 +96,32 @@ local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
restart()
|
||||
BGM.play("truth")
|
||||
BG.set("rainbow")
|
||||
BGM.play('truth')
|
||||
BG.set('rainbow')
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
--origin pos:0,140; scale:4
|
||||
gc.translate(280,0)
|
||||
gc.scale(8)
|
||||
|
||||
--Draw board
|
||||
gc.setColor(0,0,0,.4)
|
||||
gc.rectangle("fill",0,0,90,90)
|
||||
gc.rectangle('fill',0,0,90,90)
|
||||
|
||||
--Draw target area
|
||||
gc.setColor(1,1,1,math.sin((TIME()-placeTime)*5)/5+.2)
|
||||
if target then
|
||||
gc.rectangle("fill",(target-1)%3*30,int((target-1)/3)*30,30,30)
|
||||
gc.rectangle('fill',(target-1)%3*30,int((target-1)/3)*30,30,30)
|
||||
elseif not gameover then
|
||||
gc.rectangle("fill",0,0,90,90)
|
||||
gc.rectangle('fill',0,0,90,90)
|
||||
end
|
||||
|
||||
--Draw cursor
|
||||
if curX then
|
||||
gc.setColor(1,1,1,.3)
|
||||
gc.rectangle("fill",(curX-1)%3*30+(curx-1)%3*10-.5,int((curX-1)/3)*30+int((curx-1)/3)*10-.5,11,11)
|
||||
gc.rectangle('fill',(curX-1)%3*30+(curx-1)%3*10-.5,int((curX-1)/3)*30+int((curx-1)/3)*10-.5,11,11)
|
||||
end
|
||||
|
||||
gc.setLineWidth(.8)
|
||||
@@ -134,7 +134,7 @@ function scene.draw()
|
||||
else
|
||||
gc.setColor(0,0,0)
|
||||
end
|
||||
gc.rectangle("fill",(X-1)%3*30,int((X-1)/3)*30,30,30)
|
||||
gc.rectangle('fill',(X-1)%3*30,int((X-1)/3)*30,30,30)
|
||||
end
|
||||
for x=1,9 do
|
||||
local c=board[X][x]
|
||||
@@ -143,7 +143,7 @@ function scene.draw()
|
||||
local _y=int((X-1)/3)*30+int((x-1)/3)*10
|
||||
if c==0 then
|
||||
gc.setColor(1,.2,.2)
|
||||
gc.rectangle("line",_x+2.25,_y+2.25,5.5,5.5)
|
||||
gc.rectangle('line',_x+2.25,_y+2.25,5.5,5.5)
|
||||
else
|
||||
gc.setColor(.3,.3,1)
|
||||
gc.line(_x+2,_y+2,_x+8,_y+8)
|
||||
@@ -165,7 +165,7 @@ function scene.draw()
|
||||
if lastX then
|
||||
gc.setColor(.5,1,.4,.8)
|
||||
local r=.5+.5*math.sin(TIME()*6.26)
|
||||
gc.rectangle("line",(lastX-1)%3*30+(lastx-1)%3*10-r,int((lastX-1)/3)*30+int((lastx-1)/3)*10-r,10+2*r,10+2*r)
|
||||
gc.rectangle('line',(lastX-1)%3*30+(lastx-1)%3*10-r,int((lastX-1)/3)*30+int((lastx-1)/3)*10-r,10+2*r,10+2*r)
|
||||
end
|
||||
gc.pop()
|
||||
|
||||
@@ -185,15 +185,15 @@ function scene.draw()
|
||||
else
|
||||
--Draw current round mark
|
||||
gc.setColor(.8,.8,.8,.8)
|
||||
gc.rectangle("fill",80,80,160,160)
|
||||
gc.rectangle('fill',80,80,160,160)
|
||||
gc.setColor(1,1,1)
|
||||
gc.setLineWidth(6)
|
||||
gc.rectangle("line",80,80,160,160)
|
||||
gc.rectangle('line',80,80,160,160)
|
||||
|
||||
gc.setLineWidth(10)
|
||||
if round==0 then
|
||||
gc.setColor(1,0,0)
|
||||
gc.rectangle("line",160-40,160-40,80,80)
|
||||
gc.rectangle('line',160-40,160-40,80,80)
|
||||
else
|
||||
gc.setColor(0,0,1)
|
||||
gc.line(160-45,160-45,160+45,160+45)
|
||||
@@ -235,7 +235,7 @@ function scene.mouseDown(x,y)
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="reset",x=1140,y=540,w=170,h=80,font=40,color="lG",code=restart},
|
||||
WIDGET.newButton{name="reset",x=1140,y=540,w=170,h=80,font=40,color='lG',code=restart},
|
||||
WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ local val--result value
|
||||
local sym--symbol
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("none")
|
||||
BG.set('none')
|
||||
reg=false
|
||||
val="0"
|
||||
sym=false
|
||||
@@ -32,7 +32,7 @@ function scene.keyDown(k)
|
||||
elseif k:sub(1,2)=="kp"then
|
||||
scene.keyDown(k:sub(3))
|
||||
elseif k=="."then
|
||||
if not(val:find(".",nil,true)or val:find"e")then
|
||||
if not(val:find(".",nil,true)or val:find("e"))then
|
||||
if sym and not reg then
|
||||
reg=val
|
||||
val="0."
|
||||
@@ -40,7 +40,7 @@ function scene.keyDown(k)
|
||||
val=val.."."
|
||||
end
|
||||
elseif k=="e"then
|
||||
if not val:find"e"then
|
||||
if not val:find("e")then
|
||||
val=val.."e"
|
||||
end
|
||||
elseif k=="backspace"then
|
||||
@@ -83,10 +83,10 @@ end
|
||||
function scene.draw()
|
||||
gc.setColor(1,1,1)
|
||||
gc.setLineWidth(4)
|
||||
gc.rectangle("line",100,80,650,150)
|
||||
gc.rectangle('line',100,80,650,150)
|
||||
setFont(45)
|
||||
if reg then gc.printf(reg,0,100,720,"right")end
|
||||
if val then gc.printf(val,0,150,720,"right")end
|
||||
if reg then gc.printf(reg,0,100,720,'right')end
|
||||
if val then gc.printf(val,0,150,720,'right')end
|
||||
if sym then setFont(50)gc.print(sym,126,150)end
|
||||
end
|
||||
|
||||
@@ -101,14 +101,14 @@ scene.widgetList={
|
||||
WIDGET.newKey{name="_8",x=250,y=500,w=90,fText="8",font=50,code=pressKey"8"},
|
||||
WIDGET.newKey{name="_9",x=350,y=500,w=90,fText="9",font=50,code=pressKey"9"},
|
||||
WIDGET.newKey{name="_0",x=150,y=600,w=90,fText="0",font=50,code=pressKey"0"},
|
||||
WIDGET.newKey{name=".",x=250,y=600,w=90,fText=".",color="lM",font=50,code=pressKey"."},
|
||||
WIDGET.newKey{name="e",x=350,y=600,w=90,fText="e",color="lM",font=50,code=pressKey"e"},
|
||||
WIDGET.newKey{name="+",x=450,y=300,w=90,fText="+",color="lB",font=50,code=pressKey"+"},
|
||||
WIDGET.newKey{name="-",x=450,y=400,w=90,fText="-",color="lB",font=50,code=pressKey"-"},
|
||||
WIDGET.newKey{name="*",x=450,y=500,w=90,fText="*",color="lB",font=50,code=pressKey"*"},
|
||||
WIDGET.newKey{name="/",x=450,y=600,w=90,fText="/",color="lB",font=50,code=pressKey"/"},
|
||||
WIDGET.newKey{name="<",x=550,y=300,w=90,fText="<",color="lR",font=50,code=pressKey"backspace"},
|
||||
WIDGET.newKey{name="=",x=550,y=400,w=90,fText="=",color="lY",font=50,code=pressKey"return"},
|
||||
WIDGET.newKey{name=".",x=250,y=600,w=90,fText=".",color='lM',font=50,code=pressKey"."},
|
||||
WIDGET.newKey{name="e",x=350,y=600,w=90,fText="e",color='lM',font=50,code=pressKey"e"},
|
||||
WIDGET.newKey{name="+",x=450,y=300,w=90,fText="+",color='lB',font=50,code=pressKey"+"},
|
||||
WIDGET.newKey{name="-",x=450,y=400,w=90,fText="-",color='lB',font=50,code=pressKey"-"},
|
||||
WIDGET.newKey{name="*",x=450,y=500,w=90,fText="*",color='lB',font=50,code=pressKey"*"},
|
||||
WIDGET.newKey{name="/",x=450,y=600,w=90,fText="/",color='lB',font=50,code=pressKey"/"},
|
||||
WIDGET.newKey{name="<",x=550,y=300,w=90,fText="<",color='lR',font=50,code=pressKey"backspace"},
|
||||
WIDGET.newKey{name="=",x=550,y=400,w=90,fText="=",color='lY',font=50,code=pressKey"return"},
|
||||
WIDGET.newKey{name="back",x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ function scene.sceneInit()
|
||||
score,combo=0,0
|
||||
x,y=160,500
|
||||
ex,ey=626,260
|
||||
BG.set("matrix")
|
||||
BGM.play("hang out")
|
||||
BG.set('matrix')
|
||||
BGM.play('hang out')
|
||||
love.keyboard.setKeyRepeat(false)
|
||||
end
|
||||
function scene.sceneBack()
|
||||
@@ -57,14 +57,14 @@ function scene.update()
|
||||
score=math.min(score+4+combo*2,626)
|
||||
combo=combo+1
|
||||
ex,ey=rnd(626,1100),rnd(26,700)
|
||||
SFX.play("reach")
|
||||
SFX.play('reach')
|
||||
e=true
|
||||
end
|
||||
if x>1280 or y>720 then
|
||||
if score>0 then
|
||||
score=score-int(score/10)
|
||||
end
|
||||
SFX.play("finesseError")
|
||||
SFX.play('finesseError')
|
||||
combo=0
|
||||
e=true
|
||||
end
|
||||
@@ -76,29 +76,29 @@ function scene.update()
|
||||
end
|
||||
|
||||
local scoreColor={
|
||||
"Z",--0
|
||||
"A",--20
|
||||
"N",--40
|
||||
"B",--60
|
||||
"P",--80
|
||||
"W",--100
|
||||
"R","F","O","Y","lA",--200
|
||||
"lN","lB","lP","lW","lR",--300
|
||||
"lF","lO","lY","dA","dN",--400
|
||||
"dB","dP","dW","dR","dF",--500
|
||||
"dY","lH","H","dH",--before 600, black after
|
||||
'Z',--0
|
||||
'A',--20
|
||||
'N',--40
|
||||
'B',--60
|
||||
'P',--80
|
||||
'W',--100
|
||||
'R','F','O','Y','lA',--200
|
||||
'lN','lB','lP','lW','lR',--300
|
||||
'lF','lO','lY','dA','dN',--400
|
||||
'dB','dP','dW','dR','dF',--500
|
||||
'dY','lH','H','dH',--before 600, black after
|
||||
}
|
||||
function scene.draw()
|
||||
--Spawn area
|
||||
gc.setColor(1,1,1,.2)
|
||||
gc.rectangle("fill",85,0,190,720)
|
||||
gc.rectangle('fill',85,0,190,720)
|
||||
|
||||
--Power & Angle
|
||||
gc.setColor(1,1,1)
|
||||
if state~=2 then
|
||||
gc.setLineWidth(2)
|
||||
gc.rectangle("fill",x-80,y+20,pow*1.6,16)
|
||||
gc.rectangle("line",x-80,y+20,160,15)
|
||||
gc.rectangle('fill',x-80,y+20,pow*1.6,16)
|
||||
gc.rectangle('line',x-80,y+20,160,15)
|
||||
if state==1 then
|
||||
gc.setLineWidth(5)
|
||||
gc.line(x,y,x+(20+2*pow)*cos(ang),y-(20+2*pow)*sin(ang))
|
||||
@@ -111,11 +111,11 @@ function scene.draw()
|
||||
gc.setColor(1,1,.6)
|
||||
gc.print("x"..combo,300,80)
|
||||
end
|
||||
gc.setColor(COLOR[scoreColor[int(score/20)+1]or"D"])
|
||||
gc.setColor(COLOR[scoreColor[int(score/20)+1]or'D'])
|
||||
gc.print(score,300,30)
|
||||
|
||||
--Cannon ball
|
||||
gc.circle("fill",x,y,15)
|
||||
gc.circle('fill',x,y,15)
|
||||
|
||||
--Arrow
|
||||
if y<-15 then
|
||||
@@ -124,7 +124,7 @@ function scene.draw()
|
||||
|
||||
--Target
|
||||
gc.setColor(1,1,.4)
|
||||
gc.circle("fill",ex,ey,15)
|
||||
gc.circle('fill',ex,ey,15)
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
|
||||
@@ -278,7 +278,7 @@ function commands.print(name)
|
||||
if name~=""then
|
||||
local info=love.filesystem.getInfo(name)
|
||||
if info then
|
||||
if info.type=="file"then
|
||||
if info.type=='file'then
|
||||
log{COLOR.lC,"/* "..name.." */"}
|
||||
for l in love.filesystem.lines(name)do
|
||||
log(l)
|
||||
@@ -307,9 +307,9 @@ end
|
||||
do--function commands.tree()
|
||||
local function tree(path,name,depth)
|
||||
local info=love.filesystem.getInfo(path..name)
|
||||
if info.type=="file"then
|
||||
if info.type=='file'then
|
||||
log(("\t\t"):rep(depth)..name)
|
||||
elseif info.type=="directory"then
|
||||
elseif info.type=='directory'then
|
||||
log(("\t\t"):rep(depth)..name..">")
|
||||
local L=love.filesystem.getDirectoryItems(path..name)
|
||||
for _,subName in next,L do
|
||||
@@ -320,7 +320,7 @@ do--function commands.tree()
|
||||
end
|
||||
end
|
||||
function commands.tree()
|
||||
local L=love.filesystem.getDirectoryItems("")
|
||||
local L=love.filesystem.getDirectoryItems""
|
||||
for _,name in next,L do
|
||||
if love.filesystem.getRealDirectory(name)==SAVEDIR then
|
||||
tree("",name,0)
|
||||
@@ -360,9 +360,9 @@ do--function commands.del(name)
|
||||
local path=dir.."/"..name
|
||||
local info=love.filesystem.getInfo(path)
|
||||
if info then
|
||||
if info.type=="file"then
|
||||
if info.type=='file'then
|
||||
delFile(path)
|
||||
elseif info.type=="directory"then
|
||||
elseif info.type=='directory'then
|
||||
recursiveDelDir(path)
|
||||
else
|
||||
log("Unkown item type: %s (%s)"):format(name,info.type)
|
||||
@@ -379,13 +379,13 @@ do--function commands.del(name)
|
||||
if name~=""then
|
||||
local info=love.filesystem.getInfo(name)
|
||||
if info then
|
||||
if info.type=="file"then
|
||||
if info.type=='file'then
|
||||
if recursive then
|
||||
log{C.R,name.." is not a directory."}
|
||||
else
|
||||
delFile(name)
|
||||
end
|
||||
elseif info.type=="directory"then
|
||||
elseif info.type=='directory'then
|
||||
(recursive and recursiveDelDir or delDir)(name)
|
||||
else
|
||||
log("Unkown item type: %s (%s)"):format(name,info.type)
|
||||
@@ -440,7 +440,7 @@ function commands.rmwtm(pw)
|
||||
if pw==the_secret then
|
||||
_G["\100\114\97\119\70\87\77"]=NULL
|
||||
log{C.lC,"\87\97\116\101\114\109\97\114\107\32\82\101\109\111\118\101\100"}
|
||||
SFX.play("clear")
|
||||
SFX.play('clear')
|
||||
else
|
||||
log{C.aqua,"Usage: rmwtm [password]"}
|
||||
end
|
||||
@@ -448,13 +448,13 @@ end
|
||||
function commands.unlockall(bool)
|
||||
if bool=="sure"then
|
||||
for name,M in next,MODES do
|
||||
if type(name)=="string"and not RANKS[name]and M.x then
|
||||
if type(name)=='string'and not RANKS[name]and M.x then
|
||||
RANKS[name]=M.score and 0 or 6
|
||||
end
|
||||
end
|
||||
FILE.save(RANKS,"conf/unlock")
|
||||
log{C.lC,"\85\78\76\79\67\75\65\76\76"}
|
||||
SFX.play("clear_2")
|
||||
SFX.play('clear_2')
|
||||
else
|
||||
log"Are you sure to unlock all modes?"
|
||||
log"Type: unlockall sure"
|
||||
@@ -515,7 +515,7 @@ function commands.theme(name)
|
||||
end
|
||||
end
|
||||
function commands.demo()
|
||||
SCN.go("test","none")
|
||||
SCN.go('test','none')
|
||||
end
|
||||
do--commands.applet(name)
|
||||
local appList={"15p","grid","pong","atoz","uttt","cube","2048","ten","tap","dtw","cannon","dropper","calc","reflect","polyforge"}
|
||||
@@ -565,15 +565,15 @@ local combKey={}
|
||||
function combKey.x()
|
||||
love.system.setClipboardText(inputBox.value)
|
||||
inputBox.value=""
|
||||
SFX.play("reach")
|
||||
SFX.play('reach')
|
||||
end
|
||||
function combKey.c()
|
||||
love.system.setClipboardText(inputBox.value)
|
||||
SFX.play("reach")
|
||||
SFX.play('reach')
|
||||
end
|
||||
function combKey.v()
|
||||
inputBox.value=inputBox.value..love.system.getClipboardText()
|
||||
SFX.play("reach")
|
||||
SFX.play('reach')
|
||||
end
|
||||
|
||||
|
||||
@@ -635,7 +635,7 @@ local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
TASK.new(function()YIELD()WIDGET.sel=inputBox end)
|
||||
BG.set("none")
|
||||
BG.set('none')
|
||||
end
|
||||
|
||||
function scene.keyDown(k)
|
||||
|
||||
@@ -42,9 +42,9 @@ local function hurt(i)
|
||||
speed=speed*.5
|
||||
moveDir=0
|
||||
score=int(score)
|
||||
SFX.play("clear_4")
|
||||
SFX.play('clear_4')
|
||||
else
|
||||
SFX.play("clear_2")
|
||||
SFX.play('clear_2')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -61,9 +61,9 @@ function scene.sceneInit()
|
||||
score=0
|
||||
sunH,color,rot=0,{.878,.752,0},0
|
||||
|
||||
gc.setLineJoin("bevel")
|
||||
BGM.play("push")
|
||||
BG.set("none")
|
||||
gc.setLineJoin('bevel')
|
||||
BGM.play('push')
|
||||
BG.set('none')
|
||||
love.keyboard.setKeyRepeat(false)
|
||||
end
|
||||
function scene.sceneBack()
|
||||
@@ -175,7 +175,7 @@ function scene.update(dt)
|
||||
if score>1000*level then
|
||||
if speed<3 then speed=speed+.2 end
|
||||
level=level+1
|
||||
SFX.play("blip_1")
|
||||
SFX.play('blip_1')
|
||||
end
|
||||
sunH=sunH+.01
|
||||
elseif menu==1 then
|
||||
@@ -200,33 +200,33 @@ function scene.draw()
|
||||
--Health bar
|
||||
if life1>0 then
|
||||
gc.setColor(1,0,0)
|
||||
gc.rectangle("fill",640-life1*.64,710,life1*1.28,10)
|
||||
gc.rectangle('fill',640-life1*.64,710,life1*1.28,10)
|
||||
end
|
||||
|
||||
--Draw player
|
||||
if play and inv%8<4 then
|
||||
gc.setColor(1,1,1)
|
||||
gc.rectangle("fill",620,670,40,40)
|
||||
gc.rectangle('fill',620,670,40,40)
|
||||
end
|
||||
|
||||
--Set screen rotation
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.translate(640,690)
|
||||
gc.rotate(rot)
|
||||
|
||||
--Draw sun
|
||||
gc.setColor(.7,.5,.3)
|
||||
gc.circle("fill",0,-380-sunH,60)
|
||||
gc.circle('fill',0,-380-sunH,60)
|
||||
|
||||
--Draw sun-board
|
||||
gc.setColor(.15,.15,.15)
|
||||
gc.rectangle("fill",-60,-440,120,120)
|
||||
gc.rectangle('fill',-60,-440,120,120)
|
||||
|
||||
--Draw direction
|
||||
if play then
|
||||
gc.setLineWidth(3)
|
||||
gc.setColor(1,1,1,.1)
|
||||
gc.polygon("fill",-15,30,0,-440,15,30)
|
||||
gc.polygon('fill',-15,30,0,-440,15,30)
|
||||
end
|
||||
|
||||
--Draw Horizon/Direction
|
||||
@@ -243,10 +243,10 @@ function scene.draw()
|
||||
local y=5/(10-Y)*150-50
|
||||
if Y>1 then
|
||||
gc.setColor(color)
|
||||
gc.rectangle("fill",x,y-485,size,size)
|
||||
gc.rectangle('fill',x,y-485,size,size)
|
||||
gc.setLineWidth(size*.05)
|
||||
gc.setColor(1,1,1)
|
||||
gc.rectangle("line",x,y-485,size,size)
|
||||
gc.rectangle('line',x,y-485,size,size)
|
||||
end
|
||||
|
||||
if play and y>420 and y<480 and x<8 and x+size>-8 and inv==0 then
|
||||
@@ -276,10 +276,10 @@ function scene.draw()
|
||||
end
|
||||
else
|
||||
gc.setColor(1,1,1)
|
||||
gc.rectangle("fill",-20,-20+ct,40,40)
|
||||
gc.rectangle('fill',-20,-20+ct,40,40)
|
||||
|
||||
gc.setColor(1,1,1,(1-ct/60)*.1)
|
||||
gc.polygon("fill",-15,30,0,-440,15,30)
|
||||
gc.polygon('fill',-15,30,0,-440,15,30)
|
||||
|
||||
gc.setColor(1,1,1,ct/60)
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@ end
|
||||
|
||||
function scene.sceneInit()
|
||||
restart()
|
||||
state="menu"
|
||||
BGM.play("hang out")
|
||||
BG.set("space")
|
||||
state='menu'
|
||||
BGM.play('hang out')
|
||||
BG.set('space')
|
||||
love.keyboard.setKeyRepeat(false)
|
||||
end
|
||||
function scene.sceneBack()
|
||||
@@ -42,7 +42,7 @@ end
|
||||
|
||||
function scene.keyDown(key)
|
||||
if key=="space"or key=="return"then
|
||||
if state=="move"then
|
||||
if state=='move'then
|
||||
if floor>0 then
|
||||
if move.x<base.x then
|
||||
move.x=move.x+10
|
||||
@@ -50,15 +50,15 @@ function scene.keyDown(key)
|
||||
move.x=move.x-10
|
||||
end
|
||||
end
|
||||
SFX.play("swipe")
|
||||
state="drop"
|
||||
elseif state=="dead"then
|
||||
SFX.play('swipe')
|
||||
state='drop'
|
||||
elseif state=='dead'then
|
||||
move.x,move.y,move.l=1e99,0,0
|
||||
base.x,base.y,base.l=1e99,0,0
|
||||
state="scroll"
|
||||
elseif state=="menu"then
|
||||
state='scroll'
|
||||
elseif state=='menu'then
|
||||
restart()
|
||||
state="move"
|
||||
state='move'
|
||||
end
|
||||
elseif key=="escape"then
|
||||
SCN.back()
|
||||
@@ -74,39 +74,39 @@ function scene.touchDown()
|
||||
end
|
||||
|
||||
function scene.update()
|
||||
if state=="move"then
|
||||
if state=='move'then
|
||||
move.x=move.x+speed
|
||||
if speed<0 and move.x<=0 or speed>0 and move.x+move.l>=1280 then
|
||||
SFX.play("lock")
|
||||
SFX.play('lock')
|
||||
speed=-speed
|
||||
end
|
||||
elseif state=="drop"then
|
||||
elseif state=='drop'then
|
||||
move.y=move.y+18
|
||||
if move.y>=660 then
|
||||
if move.x>base.x+base.l or move.x+move.l<base.x then
|
||||
message=miss[rnd(1,4)]
|
||||
state="die"
|
||||
state='die'
|
||||
else
|
||||
move.y=660
|
||||
SFX.play("clear_1")
|
||||
SFX.play('clear_1')
|
||||
if floor>0 and move.x==base.x then
|
||||
SFX.play("ren_mega")
|
||||
SFX.play('ren_mega')
|
||||
end
|
||||
state="shorten"
|
||||
state='shorten'
|
||||
end
|
||||
end
|
||||
elseif state=="shorten"then
|
||||
elseif state=='shorten'then
|
||||
if move.x>base.x+base.l or move.x+move.l<base.x then
|
||||
state="die"
|
||||
state='die'
|
||||
elseif move.x<base.x then
|
||||
move.x=move.x+5
|
||||
move.l=move.l-5
|
||||
elseif move.x+move.l>base.x+base.l then
|
||||
move.l=move.l-5
|
||||
else
|
||||
state="climb"
|
||||
state='climb'
|
||||
end
|
||||
elseif state=="climb"then
|
||||
elseif state=='climb'then
|
||||
if base.y<720 then
|
||||
move.y=move.y+3
|
||||
base.y=base.y+3
|
||||
@@ -135,22 +135,22 @@ function scene.update()
|
||||
speed=-10
|
||||
end
|
||||
move.y=rnd(max(260-floor*4,60),max(420-floor*5,100))
|
||||
state="move"
|
||||
state='move'
|
||||
end
|
||||
elseif state=="die"then
|
||||
elseif state=='die'then
|
||||
move.y=move.y+18
|
||||
if move.y>1000 then
|
||||
highScore=max(score,highScore)
|
||||
highFloor=max(floor,floor)
|
||||
state="dead"
|
||||
state='dead'
|
||||
end
|
||||
elseif state=="scroll"then
|
||||
elseif state=='scroll'then
|
||||
camY=camY-floor/4
|
||||
if camY<1000 then camY=camY-1 end
|
||||
if camY<500 then camY=camY-1 end
|
||||
if camY<0 then
|
||||
restart()
|
||||
state="move"
|
||||
state='move'
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -175,15 +175,15 @@ function scene.draw()
|
||||
--Background
|
||||
local lv,height=int(camY/700),camY%700
|
||||
gc.setColor(backColor[lv+1]or COLOR.D)
|
||||
gc.rectangle("fill",0,720,1280,height-700)
|
||||
gc.rectangle('fill',0,720,1280,height-700)
|
||||
gc.setColor(backColor[lv+2]or COLOR.D)
|
||||
gc.rectangle("fill",0,height+20,1280,-height-20)
|
||||
gc.rectangle('fill',0,height+20,1280,-height-20)
|
||||
if height-680>0 then
|
||||
gc.setColor(backColor[lv+3]or COLOR.D)
|
||||
gc.rectangle("fill",0,height-680,1280,680-height)
|
||||
gc.rectangle('fill',0,height-680,1280,680-height)
|
||||
end
|
||||
|
||||
if state=="menu"or state=="dead"then
|
||||
if state=='menu'or state=='dead'then
|
||||
setFont(100)
|
||||
gc.setColor(COLOR.rainbow_light(TIME()*2.6))
|
||||
mStr("DROPPER",640,120)
|
||||
@@ -201,7 +201,7 @@ function scene.draw()
|
||||
gc.print("Original CX-CAS version by MrZ",740,235)
|
||||
gc.print("Ported / Rewritten / Balanced by MrZ",740,260)
|
||||
end
|
||||
if state~="menu"then
|
||||
if state~='menu'then
|
||||
--High floor
|
||||
gc.setColor(1,1,1)
|
||||
gc.setLineWidth(2)
|
||||
@@ -209,8 +209,8 @@ function scene.draw()
|
||||
gc.line(0,y,1280,y)
|
||||
|
||||
gc.setLineWidth(6)
|
||||
gc.rectangle("line",move.x-3,move.y-3,move.l+6,36)
|
||||
gc.rectangle("line",base.x-3,base.y-3,base.l+6,36)
|
||||
gc.rectangle('line',move.x-3,move.y-3,move.l+6,36)
|
||||
gc.rectangle('line',base.x-3,base.y-3,base.l+6,36)
|
||||
|
||||
setFont(45)
|
||||
gc.print(floor+1,move.x+move.l+15,move.y-18)
|
||||
@@ -227,8 +227,8 @@ function scene.draw()
|
||||
gc.setColor(0,0,0)
|
||||
gc.print(score,64,43)
|
||||
|
||||
gc.setColor(color1)gc.rectangle("fill",move.x,move.y,move.l,30)
|
||||
gc.setColor(color2)gc.rectangle("fill",base.x,base.y,base.l,30)
|
||||
gc.setColor(color1)gc.rectangle('fill',move.x,move.y,move.l,30)
|
||||
gc.setColor(color2)gc.rectangle('fill',base.x,base.y,base.l,30)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -106,8 +106,8 @@ function scene.sceneInit()
|
||||
mode=1
|
||||
arcade=true
|
||||
reset()
|
||||
BG.set("gray")
|
||||
BGM.play("way")
|
||||
BG.set('gray')
|
||||
BGM.play('way')
|
||||
love.keyboard.setKeyRepeat(false)
|
||||
end
|
||||
function scene.sceneBack()
|
||||
@@ -123,7 +123,7 @@ local function touch(n)
|
||||
if n==a or n==b then
|
||||
if a>0 and b>0 then
|
||||
pos[1]=n==a and b or a
|
||||
SFX.play("move")
|
||||
SFX.play('move')
|
||||
else
|
||||
rem(pos,1)
|
||||
newTile()
|
||||
@@ -138,19 +138,19 @@ local function touch(n)
|
||||
end
|
||||
time=TIME()-startTime
|
||||
state=2
|
||||
SFX.play("win")
|
||||
SFX.play('win')
|
||||
else
|
||||
SFX.play("reach",.5)
|
||||
SFX.play('reach',.5)
|
||||
end
|
||||
end
|
||||
height=height+120
|
||||
SFX.play("move")
|
||||
SFX.play('move')
|
||||
end
|
||||
else
|
||||
time=TIME()-startTime
|
||||
state=2
|
||||
diePos=n
|
||||
SFX.play("clear_2")
|
||||
SFX.play('clear_2')
|
||||
end
|
||||
end
|
||||
function scene.keyDown(key)
|
||||
@@ -194,7 +194,7 @@ function scene.update()
|
||||
rollSpeed=rollSpeed+.00355
|
||||
if height<-120 then
|
||||
state=2
|
||||
SFX.play("clear_2")
|
||||
SFX.play('clear_2')
|
||||
end
|
||||
else
|
||||
height=height*.6
|
||||
@@ -233,16 +233,16 @@ function scene.draw()
|
||||
end
|
||||
|
||||
--Draw tiles
|
||||
gc.rectangle("fill",300,0,680,720)
|
||||
gc.rectangle('fill',300,0,680,720)
|
||||
gc.setColor(tileColor[mode])
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.translate(0,720-height+8)
|
||||
for i=1,#pos do
|
||||
if pos[i]<10 then
|
||||
gc.rectangle("fill",130+170*pos[i]+8,-i*120,170-16,120-16)
|
||||
gc.rectangle('fill',130+170*pos[i]+8,-i*120,170-16,120-16)
|
||||
else
|
||||
gc.rectangle("fill",130+170*(pos[i]%10)+8,-i*120,170-16,120-16)
|
||||
gc.rectangle("fill",130+170*int(pos[i]/10)+8,-i*120,170-16,120-16)
|
||||
gc.rectangle('fill',130+170*(pos[i]%10)+8,-i*120,170-16,120-16)
|
||||
gc.rectangle('fill',130+170*int(pos[i]/10)+8,-i*120,170-16,120-16)
|
||||
end
|
||||
end
|
||||
gc.pop()
|
||||
@@ -262,12 +262,12 @@ function scene.draw()
|
||||
--Draw red tile
|
||||
if diePos then
|
||||
gc.setColor(1,.2,.2)
|
||||
gc.rectangle("fill",130+170*diePos+8,600-height+8,170-16,120-16)
|
||||
gc.rectangle('fill',130+170*diePos+8,600-height+8,170-16,120-16)
|
||||
end
|
||||
|
||||
--Draw score
|
||||
setFont(100)
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.translate(640,26)
|
||||
gc.scale(1.6)
|
||||
gc.setColor(.5,.5,.5,.6)
|
||||
@@ -276,7 +276,7 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="reset", x=155,y=100,w=180,h=100,color="lG",font=40,code=pressKey"r"},
|
||||
WIDGET.newButton{name="reset", x=155,y=100,w=180,h=100,color='lG',font=40,code=pressKey"r"},
|
||||
WIDGET.newButton{name="mode", x=155,y=220,w=180,h=100,font=40,code=pressKey"q",hide=function()return state~=0 end},
|
||||
WIDGET.newSwitch{name="arcade", x=230,y=330,font=40,disp=function()return arcade end,code=pressKey"w",hide=function()return state~=0 end},
|
||||
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
|
||||
@@ -36,8 +36,8 @@ function scene.sceneInit()
|
||||
hit[c],hit[c+1]=rnd(2),rnd(2)
|
||||
dist[c],dist[c+1]=226,126
|
||||
end
|
||||
BG.set("light")
|
||||
BGM.play("dream")
|
||||
BG.set('light')
|
||||
BGM.play('dream')
|
||||
love.keyboard.setKeyRepeat(false)
|
||||
end
|
||||
function scene.sceneBack()
|
||||
@@ -57,19 +57,19 @@ function scene.keyDown(k)
|
||||
if hit[c]==0 then
|
||||
hit[c]=1
|
||||
count=count+1
|
||||
SFX.play(side<26 and"ren_"..rnd(5)or"ren_"..rnd(6,11))
|
||||
SFX.play(side<26 and'ren_'..rnd(5)or'ren_'..rnd(6,11))
|
||||
if count>=12 then
|
||||
SFX.play("ren_mega",(count-11)/15)
|
||||
SFX.play('ren_mega',(count-11)/15)
|
||||
end
|
||||
if count==side then
|
||||
state=1
|
||||
SFX.play("spin_0")
|
||||
SFX.play('spin_0')
|
||||
else
|
||||
SFX.play("lock")
|
||||
SFX.play('lock')
|
||||
end
|
||||
else
|
||||
hit[c]=2
|
||||
SFX.play("emit")
|
||||
SFX.play('emit')
|
||||
needReset=true
|
||||
state=1
|
||||
end
|
||||
@@ -130,7 +130,7 @@ function scene.draw()
|
||||
gc.setColor(0,0,0,1-timer/50)
|
||||
setFont(80)
|
||||
mStr(side,640,300)
|
||||
gc.polygon("fill",
|
||||
gc.polygon('fill',
|
||||
640+cos(pos-.03)*300,360+sin(pos-.03)*300,
|
||||
640+cos(pos)*285,360+sin(pos)*285,
|
||||
640+cos(pos+.03)*300,360+sin(pos+.03)*300
|
||||
@@ -163,7 +163,7 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newKey{name="back",x=1140,y=60,w=170,h=80,color="D",font=40,code=pressKey"escape"},
|
||||
WIDGET.newKey{name="back",x=1140,y=60,w=170,h=80,color='D',font=40,code=pressKey"escape"},
|
||||
}
|
||||
|
||||
return scene
|
||||
@@ -15,8 +15,8 @@ local ry=0--Rotation Y
|
||||
local p1,p2--Player data
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("none")
|
||||
BGM.play("way")
|
||||
BG.set('none')
|
||||
BGM.play('way')
|
||||
state=0
|
||||
|
||||
bx,by=640,360
|
||||
@@ -53,7 +53,7 @@ function scene.keyDown(key)
|
||||
vx,vy=0,0
|
||||
ry=0
|
||||
p1.score,p2.score=0,0
|
||||
SFX.play("hold")
|
||||
SFX.play('hold')
|
||||
elseif key=="w"or key=="s"then
|
||||
p1.y0=false
|
||||
elseif key=="up"or key=="down"then
|
||||
@@ -119,7 +119,7 @@ function scene.update()
|
||||
vx=-vx-(vx>0 and .05 or -.5)
|
||||
vy=vy+d*.08+P.vy*.5
|
||||
ry=P.vy
|
||||
SFX.play("collect")
|
||||
SFX.play('collect')
|
||||
else
|
||||
state=2
|
||||
end
|
||||
@@ -127,14 +127,14 @@ function scene.update()
|
||||
if by<30 or by>690 then
|
||||
by=by<30 and 30 or 690
|
||||
vy,ry=-vy,-ry
|
||||
SFX.play("collect")
|
||||
SFX.play('collect')
|
||||
end
|
||||
elseif state==2 then--Game over
|
||||
if bx<-120 or bx>1400 or by<-40 or by>760 then
|
||||
P=bx>640 and p1 or p2
|
||||
P.score=P.score+1
|
||||
TEXT.show("+1",bx>1400 and 470 or 810,226,50,"score")
|
||||
SFX.play("reach")
|
||||
TEXT.show("+1",bx>1400 and 470 or 810,226,50,'score')
|
||||
SFX.play('reach')
|
||||
|
||||
state=0
|
||||
bx,by=640,360
|
||||
@@ -159,15 +159,15 @@ function scene.draw()
|
||||
|
||||
--Draw ball & speed line
|
||||
gc.setColor(1,1,1-abs(ry)*.16)
|
||||
gc.circle("fill",bx,by,10)
|
||||
gc.circle('fill',bx,by,10)
|
||||
gc.setColor(1,1,1,.1)
|
||||
gc.line(bx+vx*22,by+vy*22,bx+vx*30,by+vy*30)
|
||||
|
||||
--Draw pads
|
||||
gc.setColor(1,.8,.8)
|
||||
gc.rectangle("fill",130,p1.y-50,20,100)
|
||||
gc.rectangle('fill',130,p1.y-50,20,100)
|
||||
gc.setColor(.8,.8,1)
|
||||
gc.rectangle("fill",1130,p2.y-50,20,100)
|
||||
gc.rectangle('fill',1130,p2.y-50,20,100)
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
|
||||
@@ -16,7 +16,7 @@ end
|
||||
|
||||
function scene.sceneInit()
|
||||
reset()
|
||||
BG.set("none")
|
||||
BG.set('none')
|
||||
love.keyboard.setKeyRepeat(false)
|
||||
end
|
||||
function scene.sceneBack()
|
||||
@@ -36,7 +36,7 @@ function scene.keyDown(key)
|
||||
--BEAUTIFUL LOGIC BELOW:
|
||||
|
||||
--early = error, [UP-key]==[target is up] = correct sfx, else = wrong sfx
|
||||
SFX.play(ct>6 and"finesseError"or key%2==1==up and"reach"or"fail")
|
||||
SFX.play(ct>6 and'finesseError'or key%2==1==up and'reach'or'fail')
|
||||
|
||||
--(early && P2-key || not early && [P1-key]==[target is up]) = P1 win, else P2 win
|
||||
if ct>6 and key>2 or ct<=6 and key%4<2==up then
|
||||
@@ -103,8 +103,8 @@ function scene.draw()
|
||||
|
||||
--Score
|
||||
setFont(80)
|
||||
gc.printf(s1,50,300,200,"left")
|
||||
gc.printf(s2,1030,300,200,"right")
|
||||
gc.printf(s1,50,300,200)
|
||||
gc.printf(s2,1030,300,200,'right')
|
||||
|
||||
if state==0 then
|
||||
setFont(40)
|
||||
@@ -117,17 +117,17 @@ function scene.draw()
|
||||
end
|
||||
elseif state==1 then
|
||||
gc.setColor(.2,.7,.4,math.min((60-ct)/10,ct/10)*.8)
|
||||
gc.arc("fill",640,360,260,-1.5708,-1.5708+(ct/60)*6.2832)
|
||||
gc.arc('fill',640,360,260,-1.5708,-1.5708+(ct/60)*6.2832)
|
||||
elseif state==2 and ct<5 then
|
||||
gc.setColor(1,ct>2 and 1 or 0,0)
|
||||
gc.rectangle("fill",640-100,(up and 180 or 540)-100,200,200,10)
|
||||
gc.rectangle('fill',640-100,(up and 180 or 540)-100,200,200,10)
|
||||
elseif state==3 then
|
||||
local x=(60-ct)*62
|
||||
gc.setColor(.4,1,.4,ct/100)
|
||||
if winner==1 then
|
||||
gc.rectangle("fill",0,0,x,720)
|
||||
gc.rectangle('fill',0,0,x,720)
|
||||
else
|
||||
gc.rectangle("fill",1280,0,-x,720)
|
||||
gc.rectangle('fill',1280,0,-x,720)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,8 +15,8 @@ local state,progress
|
||||
local tapFX,mistake
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("space")
|
||||
BGM.play("way")
|
||||
BG.set('space')
|
||||
BGM.play('way')
|
||||
board={}
|
||||
rank=3
|
||||
blind=false
|
||||
@@ -54,11 +54,11 @@ local function tapBoard(x,y)
|
||||
if board[x]==progress+1 then
|
||||
progress=progress+1
|
||||
if progress<R^2 then
|
||||
SFX.play("lock")
|
||||
SFX.play('lock')
|
||||
else
|
||||
time=TIME()-startTime+mistake
|
||||
state=2
|
||||
SFX.play("reach")
|
||||
SFX.play('reach')
|
||||
end
|
||||
if tapFX then
|
||||
SYSFX.newShade(3,320+640/R*X,40+640/R*Y,640/R,640/R,.6,.8,1)
|
||||
@@ -68,7 +68,7 @@ local function tapBoard(x,y)
|
||||
if tapFX then
|
||||
SYSFX.newShade(2,320+640/R*X,40+640/R*Y,640/R,640/R,1,.4,.5)
|
||||
end
|
||||
SFX.play("finesseError")
|
||||
SFX.play('finesseError')
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -130,7 +130,7 @@ function scene.draw()
|
||||
if state==2 then
|
||||
--Draw no-setting area
|
||||
gc.setColor(1,0,0,.3)
|
||||
gc.rectangle("fill",15,295,285,250)
|
||||
gc.rectangle('fill',15,295,285,250)
|
||||
|
||||
gc.setColor(.9,.9,0)--win
|
||||
elseif state==1 then
|
||||
@@ -139,7 +139,7 @@ function scene.draw()
|
||||
gc.setColor(.2,.8,.2)--ready
|
||||
end
|
||||
gc.setLineWidth(10)
|
||||
gc.rectangle("line",310,30,660,660)
|
||||
gc.rectangle('line',310,30,660,660)
|
||||
|
||||
local width=640/rank
|
||||
local mono=state==0 or blind and state==1 and progress>0
|
||||
@@ -151,9 +151,9 @@ function scene.draw()
|
||||
local N=board[rank*(i-1)+j]
|
||||
if not(state==1 and disappear and N<=progress)then
|
||||
gc.setColor(.4,.5,.6)
|
||||
gc.rectangle("fill",320+(j-1)*width,(i-1)*width+40,width,width)
|
||||
gc.rectangle('fill',320+(j-1)*width,(i-1)*width+40,width,width)
|
||||
gc.setColor(1,1,1)
|
||||
gc.rectangle("line",320+(j-1)*width,(i-1)*width+40,width,width)
|
||||
gc.rectangle('line',320+(j-1)*width,(i-1)*width+40,width,width)
|
||||
if not mono then
|
||||
local x,y=320+(j-.5)*width,40+(i-.5)*width-f*.67
|
||||
gc.setColor(.1,.1,.1)
|
||||
@@ -168,7 +168,7 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lG",font=40,code=pressKey"space",hide=function()return state==0 end},
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color='lG',font=40,code=pressKey"space",hide=function()return state==0 end},
|
||||
WIDGET.newSlider{name="rank", x=130,y=250,w=150,unit=3,show=false,font=40,disp=function()return rank-3 end,code=function(v)rank=v+3 end,hide=function()return state>0 end},
|
||||
WIDGET.newSwitch{name="blind", x=240,y=330,w=60, font=40,disp=function()return blind end, code=pressKey"q",hide=function()return state==1 end},
|
||||
WIDGET.newSwitch{name="disappear", x=240,y=420,w=60, font=40,disp=function()return disappear end,code=pressKey"w",hide=function()return state==1 end},
|
||||
|
||||
@@ -12,8 +12,8 @@ function scene.sceneInit()
|
||||
lastKey=nil
|
||||
speed=0
|
||||
keyTime={}for i=1,40 do keyTime[i]=-1e99 end
|
||||
BG.set("gray")
|
||||
BGM.play("push")
|
||||
BG.set('gray')
|
||||
BGM.play('push')
|
||||
love.keyboard.setKeyRepeat(false)
|
||||
end
|
||||
function scene.sceneBack()
|
||||
@@ -29,7 +29,7 @@ function scene.keyDown(key)
|
||||
else
|
||||
ins(keyTime,1,TIME())
|
||||
keyTime[41]=nil
|
||||
SFX.play("click",.3)
|
||||
SFX.play('click',.3)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -66,13 +66,13 @@ function scene.draw()
|
||||
else
|
||||
gc.setColor(max(speed/maxSpeed*10-9,0),1-max(speed/maxSpeed*8-7,0),1-max(speed/maxSpeed*4-3,0))
|
||||
end
|
||||
gc.rectangle("fill",960,360,30,-320*max(speed/maxSpeed*4-3,0))
|
||||
gc.rectangle('fill',960,360,30,-320*max(speed/maxSpeed*4-3,0))
|
||||
gc.setColor(1,1,1)
|
||||
gc.rectangle("line",960,360,30,-320)
|
||||
gc.rectangle('line',960,360,30,-320)
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newKey{name="tap",x=640,y=540,w=626,h=260,fText="TAP",color="Z",font=100,code=pressKey"button"},
|
||||
WIDGET.newKey{name="tap",x=640,y=540,w=626,h=260,fText="TAP",color='Z',font=100,code=pressKey"button"},
|
||||
WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
@@ -54,8 +54,8 @@ local function reset()
|
||||
failPos=false
|
||||
end
|
||||
function scene.sceneInit()
|
||||
BG.set("rainbow2")
|
||||
BGM.play("truth")
|
||||
BG.set('rainbow2')
|
||||
BGM.play('truth')
|
||||
preview={}
|
||||
board={{},{},{},{},{}}
|
||||
cx,cy=3,3
|
||||
@@ -91,9 +91,9 @@ local function merge()
|
||||
board[cy][cx]=chosen+1
|
||||
local getScore=3^(chosen-1)*math.min(int(.5+count/2),4)
|
||||
score=score+getScore
|
||||
TEXT.show(getScore,cx*128+256,cy*128-40,40,"score")
|
||||
TEXT.show(getScore,cx*128+256,cy*128-40,40,'score')
|
||||
SYSFX.newRectRipple(2,320+cx*128-128,40+cy*128-128,128,128)
|
||||
SFX.play("lock")
|
||||
SFX.play('lock')
|
||||
if chosen==maxTile then
|
||||
maxTile=chosen+1
|
||||
if maxTile>=6 then
|
||||
@@ -104,7 +104,7 @@ local function merge()
|
||||
maxTile<=8 and 3 or
|
||||
maxTile<=11 and 4 or
|
||||
5
|
||||
SFX.play("reach")
|
||||
SFX.play('reach')
|
||||
end
|
||||
if chosen>=5 then
|
||||
SFX.play(
|
||||
@@ -204,10 +204,10 @@ function scene.update()
|
||||
for i=1,4 do for j=1,5 do if board[i][j]==board[i+1][j]then return end end end
|
||||
for i=1,5 do for j=1,4 do if board[i][j]==board[i][j+1]then return end end end
|
||||
state=2
|
||||
SFX.play("fail")
|
||||
SFX.play('fail')
|
||||
else
|
||||
fallingTimer=fast and 4 or 5
|
||||
SFX.play("move")
|
||||
SFX.play('move')
|
||||
end
|
||||
end
|
||||
elseif fast and(
|
||||
@@ -236,10 +236,10 @@ function scene.draw()
|
||||
--Previews
|
||||
if nexts then
|
||||
gc.setColor(0,0,0,.2)
|
||||
rectangle("fill",20,450,280,75)
|
||||
rectangle('fill',20,450,280,75)
|
||||
gc.setLineWidth(6)
|
||||
setColor(1,1,1)
|
||||
rectangle("line",20,450,280,75)
|
||||
rectangle('line',20,450,280,75)
|
||||
for i=1,5 do
|
||||
setFont(85-10*i)
|
||||
gc.setColor(tileColor[preview[i]])
|
||||
@@ -250,15 +250,15 @@ function scene.draw()
|
||||
if state==2 then
|
||||
--Draw no-setting area
|
||||
setColor(1,0,0,.3)
|
||||
rectangle("fill",15,200,285,210)
|
||||
rectangle('fill',15,200,285,210)
|
||||
end
|
||||
gc.setLineWidth(10)
|
||||
setColor(COLOR[
|
||||
state==0 and"G"or
|
||||
state==1 and(fast and"R"or"W")or
|
||||
state==2 and"Y"
|
||||
state==0 and'G'or
|
||||
state==1 and(fast and'R'or'W')or
|
||||
state==2 and'Y'
|
||||
])
|
||||
rectangle("line",315,35,650,650)
|
||||
rectangle('line',315,35,650,650)
|
||||
|
||||
gc.setLineWidth(4)
|
||||
setFont(70)
|
||||
@@ -269,7 +269,7 @@ function scene.draw()
|
||||
if N>0 then
|
||||
if hide and N>maxNew then
|
||||
setColor(COLOR.dH)
|
||||
rectangle("fill",320+j*128-128,40+i*128-128,128,128)
|
||||
rectangle('fill',320+j*128-128,40+i*128-128,128,128)
|
||||
setColor(1,1,1,.3)
|
||||
mStr("?",j*128+256,i*128-75)
|
||||
else
|
||||
@@ -280,7 +280,7 @@ function scene.draw()
|
||||
else
|
||||
setColor(0,0,0,1-math.abs(TIME()%.5-.25)*6-.25)
|
||||
end
|
||||
rectangle("fill",320+j*128-128,40+i*128-128,128,128)
|
||||
rectangle('fill',320+j*128-128,40+i*128-128,128,128)
|
||||
setColor(1,1,1,.9)
|
||||
mStr(N,j*128+256,i*128-75)
|
||||
end
|
||||
@@ -290,7 +290,7 @@ function scene.draw()
|
||||
if state<2 and cx then
|
||||
setColor(1,1,1,.6)
|
||||
gc.setLineWidth(10)
|
||||
rectangle("line",325+cx*128-128,45+cy*128-128,118,118)
|
||||
rectangle('line',325+cx*128-128,45+cy*128-128,118,118)
|
||||
end
|
||||
setFont(50)
|
||||
setColor(1,1,1)
|
||||
@@ -298,7 +298,7 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lG",font=40,code=pressKey"r"},
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color='lG',font=40,code=pressKey"r"},
|
||||
WIDGET.newSwitch{name="next", x=240,y=235,font=40,disp=function()return nexts end,code=pressKey"q",hide=function()return state==1 end},
|
||||
WIDGET.newSwitch{name="blind", x=240,y=305,font=40,disp=function()return blind end,code=pressKey"w",hide=function()return state==1 end},
|
||||
WIDGET.newSwitch{name="fast", x=240,y=375,font=30,disp=function()return fast end,code=pressKey"e",hide=function()return state==1 end},
|
||||
|
||||
@@ -37,45 +37,45 @@ end
|
||||
function scene.keyDown(key)
|
||||
if key=="return"or key=="return2"then
|
||||
if CUSTOMENV.opponent~="X"then
|
||||
if CUSTOMENV.opponent:sub(1,2)=="CC"and CUSTOMENV.sequence=="fixed"then
|
||||
LOG.print(text.ai_fixed,"warn")
|
||||
if CUSTOMENV.opponent:sub(1,2)=='CC'and CUSTOMENV.sequence=="fixed"then
|
||||
LOG.print(text.ai_fixed,'warn')
|
||||
return
|
||||
elseif #BAG>0 then
|
||||
LOG.print(text.ai_prebag,"warn")
|
||||
LOG.print(text.ai_prebag,'warn')
|
||||
return
|
||||
elseif #MISSION>0 then
|
||||
LOG.print(text.ai_mission,"warn")
|
||||
LOG.print(text.ai_mission,'warn')
|
||||
return
|
||||
end
|
||||
end
|
||||
if key=="return2"or kb.isDown("lalt","lctrl","lshift")then
|
||||
if initField then
|
||||
FILE.save(CUSTOMENV,"conf/customEnv","q")
|
||||
loadGame("custom_puzzle",true)
|
||||
FILE.save(CUSTOMENV,"conf/customEnv",'q')
|
||||
loadGame('custom_puzzle',true)
|
||||
end
|
||||
else
|
||||
FILE.save(CUSTOMENV,"conf/customEnv","q")
|
||||
loadGame("custom_clear",true)
|
||||
FILE.save(CUSTOMENV,"conf/customEnv",'q')
|
||||
loadGame('custom_clear',true)
|
||||
end
|
||||
elseif key=="f"then
|
||||
SCN.go("custom_field","swipeD")
|
||||
SCN.go('custom_field','swipeD')
|
||||
elseif key=="s"then
|
||||
SCN.go("custom_sequence","swipeD")
|
||||
SCN.go('custom_sequence','swipeD')
|
||||
elseif key=="m"then
|
||||
SCN.go("custom_mission","swipeD")
|
||||
SCN.go('custom_mission','swipeD')
|
||||
elseif key=="delete"then
|
||||
if sure>20 then
|
||||
TABLE.update(customEnv0,CUSTOMENV)
|
||||
for _,W in next,scene.widgetList do W:reset()end
|
||||
sure=0
|
||||
SFX.play("finesseError",.7)
|
||||
SFX.play('finesseError',.7)
|
||||
else
|
||||
sure=50
|
||||
end
|
||||
elseif key=="a"then
|
||||
SCN.go("custom_advance","swipeD")
|
||||
SCN.go('custom_advance','swipeD')
|
||||
elseif key=="f1"then
|
||||
SCN.go("mod","swipeD")
|
||||
SCN.go('mod','swipeD')
|
||||
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
||||
local str="Techmino Quest:"..DATA.copyQuestArgs().."!"
|
||||
if #BAG>0 then str=str..DATA.copySequence()end
|
||||
@@ -95,14 +95,14 @@ function scene.keyDown(key)
|
||||
repeat table.remove(FIELD)until #FIELD==0
|
||||
FIELD[1]=DATA.newBoard()
|
||||
for i=4,#args do
|
||||
if args[i]:find"%S"and not DATA.pasteBoard(args[i],i-3)and i<#args then goto THROW_fail end
|
||||
if args[i]:find("%S")and not DATA.pasteBoard(args[i],i-3)and i<#args then goto THROW_fail end
|
||||
end
|
||||
freshMiniFieldVisible()
|
||||
LOG.print(text.importSuccess,COLOR.G)
|
||||
do return end
|
||||
::THROW_fail::LOG.print(text.dataCorrupted,COLOR.R)
|
||||
elseif key=="escape"then
|
||||
FILE.save(CUSTOMENV,"conf/customEnv","q")
|
||||
FILE.save(CUSTOMENV,"conf/customEnv",'q')
|
||||
SCN.back()
|
||||
else
|
||||
WIDGET.keyPressed(key)
|
||||
@@ -116,12 +116,12 @@ end
|
||||
function scene.draw()
|
||||
--Field content
|
||||
if initField then
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.translate(95,290)
|
||||
gc.scale(.5)
|
||||
gc.setColor(1,1,1)
|
||||
gc.setLineWidth(3)
|
||||
gc.rectangle("line",-2,-2,304,604)
|
||||
gc.rectangle('line',-2,-2,304,604)
|
||||
local F=FIELD[1]
|
||||
local cross=TEXTURE.puzzleMark[-1]
|
||||
local texture=SKIN.curText
|
||||
@@ -169,34 +169,34 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=520, y=5,font=70,align="R"},
|
||||
WIDGET.newText{name="subTitle", x=530, y=50,font=35,align="L",color="H"},
|
||||
WIDGET.newText{name="defSeq", x=330, y=550,align="L",color="H",hide=function()return BAG[1]end},
|
||||
WIDGET.newText{name="noMsn", x=610, y=550,align="L",color="H",hide=function()return MISSION[1]end},
|
||||
WIDGET.newText{name="title", x=520, y=5,font=70,align='R'},
|
||||
WIDGET.newText{name="subTitle", x=530, y=50,font=35,align='L',color='H'},
|
||||
WIDGET.newText{name="defSeq", x=330, y=550,align='L',color='H',hide=function()return BAG[1]end},
|
||||
WIDGET.newText{name="noMsn", x=610, y=550,align='L',color='H',hide=function()return MISSION[1]end},
|
||||
|
||||
--Basic
|
||||
WIDGET.newSelector{name="drop", x=170, y=150,w=220,color="O",list={0,.125,.25,.5,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},disp=CUSval("drop"),code=CUSsto("drop")},
|
||||
WIDGET.newSelector{name="lock", x=170, y=230,w=220,color="R",list={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},disp=CUSval("lock"),code=CUSsto("lock")},
|
||||
WIDGET.newSelector{name="wait", x=410, y=150,w=220,color="G",list={0,1,2,3,4,5,6,7,8,10,15,20,30,60},disp=CUSval("wait"),code=CUSsto("wait")},
|
||||
WIDGET.newSelector{name="fall", x=410, y=230,w=220,color="Y",list={0,1,2,3,4,5,6,7,8,10,15,20,30,60},disp=CUSval("fall"),code=CUSsto("fall")},
|
||||
WIDGET.newSelector{name="drop", x=170, y=150,w=220,color='O',list={0,.125,.25,.5,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},disp=CUSval("drop"),code=CUSsto("drop")},
|
||||
WIDGET.newSelector{name="lock", x=170, y=230,w=220,color='R',list={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},disp=CUSval("lock"),code=CUSsto("lock")},
|
||||
WIDGET.newSelector{name="wait", x=410, y=150,w=220,color='G',list={0,1,2,3,4,5,6,7,8,10,15,20,30,60},disp=CUSval("wait"),code=CUSsto("wait")},
|
||||
WIDGET.newSelector{name="fall", x=410, y=230,w=220,color='Y',list={0,1,2,3,4,5,6,7,8,10,15,20,30,60},disp=CUSval("fall"),code=CUSsto("fall")},
|
||||
|
||||
--Else
|
||||
WIDGET.newSelector{name="bg", x=1070, y=150,w=250,color="Y",list=BG.getList(),disp=CUSval("bg"),code=function(i)CUSTOMENV.bg=i BG.set(i)end},
|
||||
WIDGET.newSelector{name="bgm", x=1070, y=230,w=250,color="Y",list=BGM.getList(),disp=CUSval("bgm"),code=function(i)CUSTOMENV.bgm=i BGM.play(i)end},
|
||||
WIDGET.newSelector{name="bg", x=1070, y=150,w=250,color='Y',list=BG.getList(),disp=CUSval"bg",code=function(i)CUSTOMENV.bg=i BG.set(i)end},
|
||||
WIDGET.newSelector{name="bgm", x=1070, y=230,w=250,color='Y',list=BGM.getList(),disp=CUSval"bgm",code=function(i)CUSTOMENV.bgm=i BGM.play(i)end},
|
||||
|
||||
--Copy/Paste/Start
|
||||
WIDGET.newButton{name="copy", x=1070, y=310,w=310,h=70,color="lR",font=25,code=pressKey"cC"},
|
||||
WIDGET.newButton{name="paste", x=1070, y=390,w=310,h=70,color="lB",font=25,code=pressKey"cV"},
|
||||
WIDGET.newButton{name="clear", x=1070, y=470,w=310,h=70,color="lY",font=35,code=pressKey"return"},
|
||||
WIDGET.newButton{name="puzzle", x=1070, y=550,w=310,h=70,color="lM",font=35,code=pressKey"return2",hide=function()return not initField end},
|
||||
WIDGET.newButton{name="copy", x=1070, y=310,w=310,h=70,color='lR',font=25,code=pressKey"cC"},
|
||||
WIDGET.newButton{name="paste", x=1070, y=390,w=310,h=70,color='lB',font=25,code=pressKey"cV"},
|
||||
WIDGET.newButton{name="clear", x=1070, y=470,w=310,h=70,color='lY',font=35,code=pressKey"return"},
|
||||
WIDGET.newButton{name="puzzle", x=1070, y=550,w=310,h=70,color='lM',font=35,code=pressKey"return2",hide=function()return not initField end},
|
||||
|
||||
--More
|
||||
WIDGET.newKey{name="reset", x=730, y=150,w=220,h=90,color="R",font=30,code=pressKey"delete"},
|
||||
WIDGET.newKey{name="advance", x=730, y=270,w=220,h=90,color="F",font=35,code=pressKey"a"},
|
||||
WIDGET.newKey{name="mod", x=730, y=390,w=220,h=90,color="Z",font=35,code=pressKey"f1"},
|
||||
WIDGET.newKey{name="field", x=170, y=640,w=240,h=80,color="A",font=25,code=pressKey"f"},
|
||||
WIDGET.newKey{name="sequence", x=450, y=640,w=240,h=80,color="W",font=25,code=pressKey"s"},
|
||||
WIDGET.newKey{name="mission", x=730, y=640,w=240,h=80,color="N",font=25,code=pressKey"m"},
|
||||
WIDGET.newKey{name="reset", x=730, y=150,w=220,h=90,color='R',font=30,code=pressKey"delete"},
|
||||
WIDGET.newKey{name="advance", x=730, y=270,w=220,h=90,color='F',font=35,code=pressKey"a"},
|
||||
WIDGET.newKey{name="mod", x=730, y=390,w=220,h=90,color='Z',font=35,code=pressKey"f1"},
|
||||
WIDGET.newKey{name="field", x=170, y=640,w=240,h=80,color='A',font=25,code=pressKey"f"},
|
||||
WIDGET.newKey{name="sequence", x=450, y=640,w=240,h=80,color='W',font=25,code=pressKey"s"},
|
||||
WIDGET.newKey{name="mission", x=730, y=640,w=240,h=80,color='N',font=25,code=pressKey"m"},
|
||||
|
||||
WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=pressKey"escape"},
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ local sList={
|
||||
local scene={}
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=520,y=5,font=70,align="R"},
|
||||
WIDGET.newText{name="subTitle", x=530,y=50,font=35,align="L",color="H"},
|
||||
WIDGET.newText{name="title", x=520,y=5,font=70,align='R'},
|
||||
WIDGET.newText{name="subTitle", x=530,y=50,font=35,align='L',color='H'},
|
||||
|
||||
--Control
|
||||
WIDGET.newSlider{name="nextCount", x=200, y=150, w=200,unit=6, disp=CUSval("nextCount"),code=CUSsto("nextCount")},
|
||||
@@ -20,12 +20,12 @@ scene.widgetList={
|
||||
WIDGET.newSwitch{name="phyHold", x=350, y=430, disp=CUSval("phyHold"), code=CUSrev("phyHold"),hide=function()return CUSTOMENV.holdCount==0 end},
|
||||
|
||||
--Rule
|
||||
WIDGET.newSelector{name="fieldH", x=270, y=520, w=260,color="N",list=sList.fieldH, disp=CUSval("fieldH"),code=CUSsto("fieldH")},
|
||||
WIDGET.newSelector{name="visible", x=840, y=60, w=260,color="lB",list=sList.visible, disp=CUSval("visible"),code=CUSsto("visible")},
|
||||
WIDGET.newSelector{name="freshLimit",x=840, y=160, w=260,color="V",list=sList.freshLimit, disp=CUSval("freshLimit"),code=CUSsto("freshLimit")},
|
||||
WIDGET.newSelector{name="opponent", x=1120, y=60, w=260,color="R",list=sList.opponent, disp=CUSval("opponent"),code=CUSsto("opponent")},
|
||||
WIDGET.newSelector{name="life", x=1120, y=160, w=260,color="R",list=sList.life, disp=CUSval("life"),code=CUSsto("life")},
|
||||
WIDGET.newSelector{name="pushSpeed",x=1120, y=260, w=260,color="R",list=sList.pushSpeed, disp=CUSval("pushSpeed"),code=CUSsto("pushSpeed")},
|
||||
WIDGET.newSelector{name="fieldH", x=270, y=520, w=260,color='N',list=sList.fieldH, disp=CUSval("fieldH"),code=CUSsto("fieldH")},
|
||||
WIDGET.newSelector{name="visible", x=840, y=60, w=260,color='lB',list=sList.visible, disp=CUSval("visible"),code=CUSsto("visible")},
|
||||
WIDGET.newSelector{name="freshLimit",x=840, y=160, w=260,color='V',list=sList.freshLimit, disp=CUSval("freshLimit"),code=CUSsto("freshLimit")},
|
||||
WIDGET.newSelector{name="opponent", x=1120, y=60, w=260,color='R',list=sList.opponent, disp=CUSval("opponent"),code=CUSsto("opponent")},
|
||||
WIDGET.newSelector{name="life", x=1120, y=160, w=260,color='R',list=sList.life, disp=CUSval("life"),code=CUSsto("life")},
|
||||
WIDGET.newSelector{name="pushSpeed",x=1120, y=260, w=260,color='R',list=sList.pushSpeed, disp=CUSval("pushSpeed"),code=CUSsto("pushSpeed")},
|
||||
|
||||
WIDGET.newSwitch{name="ospin", x=870, y=350, font=30,disp=CUSval("ospin"), code=CUSrev("ospin")},
|
||||
WIDGET.newSwitch{name="fineKill", x=870, y=440, font=20,disp=CUSval("fineKill"),code=CUSrev("fineKill")},
|
||||
|
||||
@@ -172,7 +172,7 @@ function scene.keyDown(key)
|
||||
if sure>20 then
|
||||
for y=1,20 do for x=1,10 do FIELD[page][y][x]=0 end end
|
||||
sure=0
|
||||
SFX.play("finesseError",.7)
|
||||
SFX.play('finesseError',.7)
|
||||
else
|
||||
sure=50
|
||||
end
|
||||
@@ -181,7 +181,7 @@ function scene.keyDown(key)
|
||||
elseif key=="k"then
|
||||
ins(FIELD[page],1,{21,21,21,21,21,21,21,21,21,21})
|
||||
FIELD[page][21]=nil
|
||||
SFX.play("blip")
|
||||
SFX.play('blip')
|
||||
elseif key=="l"then
|
||||
local F=FIELD[page]
|
||||
for i=20,1,-1 do
|
||||
@@ -197,13 +197,13 @@ function scene.keyDown(key)
|
||||
repeat
|
||||
F[#F+1]={0,0,0,0,0,0,0,0,0,0}
|
||||
until#F==20
|
||||
SFX.play("clear_3",.8)
|
||||
SFX.play("fall",.8)
|
||||
SFX.play('clear_3',.8)
|
||||
SFX.play('fall',.8)
|
||||
end
|
||||
elseif key=="n"then
|
||||
ins(FIELD,page+1,DATA.newBoard(FIELD[page]))
|
||||
page=page+1
|
||||
SFX.play("blip_1",.8)
|
||||
SFX.play('blip_1',.8)
|
||||
SYSFX.newShade(3,200,60,300,600,.5,1,.5)
|
||||
elseif key=="m"then
|
||||
rem(FIELD,page)
|
||||
@@ -212,16 +212,16 @@ function scene.keyDown(key)
|
||||
ins(FIELD,DATA.newBoard())
|
||||
end
|
||||
SYSFX.newShade(3,200,60,300,600,1,.5,.5)
|
||||
SFX.play("clear_4",.8)
|
||||
SFX.play("fall",.8)
|
||||
SFX.play('clear_4',.8)
|
||||
SFX.play('fall',.8)
|
||||
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
||||
sys.setClipboardText("Techmino Field:"..DATA.copyBoard(page))
|
||||
LOG.print(text.exportSuccess,COLOR.G)
|
||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||
local str=sys.getClipboardText()
|
||||
local p=str:find":"--ptr*
|
||||
local p=str:find(":")--ptr*
|
||||
if p then
|
||||
if not str:sub(1,p-1):find"Field"then
|
||||
if not str:sub(1,p-1):find("Field")then
|
||||
LOG.print(text.pasteWrongPlace)
|
||||
end
|
||||
str=str:sub(p+1)
|
||||
@@ -269,7 +269,7 @@ function scene.draw()
|
||||
--Draw field
|
||||
gc.setColor(1,1,1)
|
||||
gc.setLineWidth(3)
|
||||
gc.rectangle("line",-2,-2,304,604)
|
||||
gc.rectangle('line',-2,-2,304,604)
|
||||
gc.setLineWidth(2)
|
||||
local cross=TEXTURE.puzzleMark[-1]
|
||||
local F=FIELD[page]
|
||||
@@ -288,7 +288,7 @@ function scene.draw()
|
||||
local x,y=30*penX,600-30*penY
|
||||
if curPen==1 or curPen==2 then
|
||||
gc.setLineWidth(5)
|
||||
gc.rectangle("line",x-30,y,30,30,4)
|
||||
gc.rectangle('line',x-30,y,30,30,4)
|
||||
elseif curPen==3 then
|
||||
gc.setLineWidth(3)
|
||||
gc.line(x-15,y,x-30,y+15)
|
||||
@@ -296,9 +296,9 @@ function scene.draw()
|
||||
gc.line(x,y+15,x-15,y+30)
|
||||
end
|
||||
gc.setLineWidth(2)
|
||||
gc.rectangle("line",x-30,y,30,30,3)
|
||||
gc.rectangle('line',x-30,y,30,30,3)
|
||||
gc.setColor(1,1,1,.2)
|
||||
gc.rectangle("fill",x-30,y,30,30,3)
|
||||
gc.rectangle('fill',x-30,y,30,30,3)
|
||||
end
|
||||
|
||||
--Draw smart pen path
|
||||
@@ -312,7 +312,7 @@ function scene.draw()
|
||||
gc.setColor(.9,.9,.9,.7+.2*math.sin(TIME()*12.6))
|
||||
end
|
||||
for i=1,#penPath do
|
||||
gc.rectangle("line",30*penPath[i][1]-30+2,600-30*penPath[i][2]+2,30-4,30-4,3)
|
||||
gc.rectangle('line',30*penPath[i][1]-30+2,600-30*penPath[i][2]+2,30-4,30-4,3)
|
||||
end
|
||||
elseif pens[curPen]==-1 then
|
||||
gc.setColor(1,1,0,.7+.3*math.sin(TIME()*12.6))
|
||||
@@ -328,7 +328,7 @@ function scene.draw()
|
||||
local c=minoColor[pens[curPen]]
|
||||
gc.setColor(c[1],c[2],c[3],.7+.2*math.sin(TIME()*12.6))
|
||||
for i=1,#penPath do
|
||||
gc.rectangle("line",30*penPath[i][1]-30+2,600-30*penPath[i][2]+2,30-4,30-4,3)
|
||||
gc.rectangle('line',30*penPath[i][1]-30+2,600-30*penPath[i][2]+2,30-4,30-4,3)
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -345,13 +345,13 @@ function scene.draw()
|
||||
gc.setColor(1,1,1)
|
||||
mStr(page,100,530)
|
||||
mStr(#FIELD,100,600)
|
||||
gc.rectangle("fill",50,600,100,6)
|
||||
gc.rectangle('fill',50,600,100,6)
|
||||
|
||||
--Draw mouse & pen color
|
||||
gc.translate(560,475)
|
||||
--Mouse
|
||||
gc.setLineWidth(2)
|
||||
gc.rectangle("line",0,0,80,110,5)
|
||||
gc.rectangle('line',0,0,80,110,5)
|
||||
gc.line(0,40,80,40)
|
||||
gc.line(33,0,33,25,47,25,47,0)
|
||||
gc.line(40,25,40,40)
|
||||
@@ -359,7 +359,7 @@ function scene.draw()
|
||||
--Left button
|
||||
if pens[1]>0 then
|
||||
gc.setColor(minoColor[pens[1]])
|
||||
gc.rectangle("fill",5,5,23,30)
|
||||
gc.rectangle('fill',5,5,23,30)
|
||||
elseif pens[1]==-1 then
|
||||
gc.setColor(1,1,1)
|
||||
gc.line(5,5,28,35)
|
||||
@@ -368,7 +368,7 @@ function scene.draw()
|
||||
if penMode==0 then
|
||||
gc.setLineWidth(13)
|
||||
gc.setColor(COLOR.rainbow(TIME()*12.6))
|
||||
gc.rectangle("fill",5,5,23,30)
|
||||
gc.rectangle('fill',5,5,23,30)
|
||||
else
|
||||
gc.setLineWidth(3)
|
||||
gc.setColor(1,0,0)
|
||||
@@ -380,7 +380,7 @@ function scene.draw()
|
||||
--Right button
|
||||
if pens[2]>0 then
|
||||
gc.setColor(minoColor[pens[2]])
|
||||
gc.rectangle("fill",52,5,23,30)
|
||||
gc.rectangle('fill',52,5,23,30)
|
||||
elseif pens[2]==-1 then
|
||||
gc.setColor(1,1,1)
|
||||
gc.setLineWidth(3)
|
||||
@@ -390,7 +390,7 @@ function scene.draw()
|
||||
if penMode==0 then
|
||||
gc.setLineWidth(13)
|
||||
gc.setColor(COLOR.rainbow(TIME()*12.6))
|
||||
gc.rectangle("fill",52,5,23,30)
|
||||
gc.rectangle('fill',52,5,23,30)
|
||||
else
|
||||
gc.setLineWidth(3)
|
||||
gc.setColor(1,0,0)
|
||||
@@ -402,7 +402,7 @@ function scene.draw()
|
||||
--Middle button
|
||||
if pens[3]>0 then
|
||||
gc.setColor(minoColor[pens[3]])
|
||||
gc.rectangle("fill",35,2,10,21)
|
||||
gc.rectangle('fill',35,2,10,21)
|
||||
elseif pens[3]==-1 then
|
||||
gc.setColor(1,1,1)
|
||||
gc.setLineWidth(2)
|
||||
@@ -412,7 +412,7 @@ function scene.draw()
|
||||
if penMode==0 then
|
||||
gc.setLineWidth(13)
|
||||
gc.setColor(COLOR.rainbow(TIME()*12.6))
|
||||
gc.rectangle("fill",35,2,10,21)
|
||||
gc.rectangle('fill',35,2,10,21)
|
||||
else
|
||||
gc.setLineWidth(3)
|
||||
gc.setColor(1,0,0)
|
||||
@@ -439,51 +439,51 @@ end
|
||||
|
||||
local function setPen(i)return function(k)pens[k]=i end end
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=1020,y=5,font=70,align="R"},
|
||||
WIDGET.newText{name="subTitle", x=1030,y=50,font=35,align="L",color="H"},
|
||||
WIDGET.newText{name="title", x=1020,y=5,font=70,align='R'},
|
||||
WIDGET.newText{name="subTitle", x=1030,y=50,font=35,align='L',color='H'},
|
||||
|
||||
WIDGET.newButton{name="b1", x=580, y=130,w=75,fText="",color="R",code=setPen(1)},--B1
|
||||
WIDGET.newButton{name="b2", x=660, y=130,w=75,fText="",color="F",code=setPen(2)},--B2
|
||||
WIDGET.newButton{name="b3", x=740, y=130,w=75,fText="",color="O",code=setPen(3)},--B3
|
||||
WIDGET.newButton{name="b4", x=820, y=130,w=75,fText="",color="Y",code=setPen(4)},--B4
|
||||
WIDGET.newButton{name="b5", x=900, y=130,w=75,fText="",color="L",code=setPen(5)},--B5
|
||||
WIDGET.newButton{name="b6", x=980, y=130,w=75,fText="",color="J",code=setPen(6)},--B6
|
||||
WIDGET.newButton{name="b7", x=1060, y=130,w=75,fText="",color="G",code=setPen(7)},--B7
|
||||
WIDGET.newButton{name="b8", x=1140, y=130,w=75,fText="",color="A",code=setPen(8)},--B8
|
||||
WIDGET.newButton{name="b1", x=580, y=130,w=75,fText="",color='R',code=setPen(1)},--B1
|
||||
WIDGET.newButton{name="b2", x=660, y=130,w=75,fText="",color='F',code=setPen(2)},--B2
|
||||
WIDGET.newButton{name="b3", x=740, y=130,w=75,fText="",color='O',code=setPen(3)},--B3
|
||||
WIDGET.newButton{name="b4", x=820, y=130,w=75,fText="",color='Y',code=setPen(4)},--B4
|
||||
WIDGET.newButton{name="b5", x=900, y=130,w=75,fText="",color='L',code=setPen(5)},--B5
|
||||
WIDGET.newButton{name="b6", x=980, y=130,w=75,fText="",color='J',code=setPen(6)},--B6
|
||||
WIDGET.newButton{name="b7", x=1060, y=130,w=75,fText="",color='G',code=setPen(7)},--B7
|
||||
WIDGET.newButton{name="b8", x=1140, y=130,w=75,fText="",color='A',code=setPen(8)},--B8
|
||||
|
||||
WIDGET.newButton{name="b9", x=580, y=210,w=75,fText="",color="C",code=setPen(9)},--B9
|
||||
WIDGET.newButton{name="b10", x=660, y=210,w=75,fText="",color="N",code=setPen(10)},--B10
|
||||
WIDGET.newButton{name="b11", x=740, y=210,w=75,fText="",color="S",code=setPen(11)},--B11
|
||||
WIDGET.newButton{name="b12", x=820, y=210,w=75,fText="",color="B",code=setPen(12)},--B12
|
||||
WIDGET.newButton{name="b13", x=900, y=210,w=75,fText="",color="V",code=setPen(13)},--B13
|
||||
WIDGET.newButton{name="b14", x=980, y=210,w=75,fText="",color="P",code=setPen(14)},--B14
|
||||
WIDGET.newButton{name="b15", x=1060, y=210,w=75,fText="",color="M",code=setPen(15)},--B15
|
||||
WIDGET.newButton{name="b16", x=1140, y=210,w=75,fText="",color="W",code=setPen(16)},--B16
|
||||
WIDGET.newButton{name="b9", x=580, y=210,w=75,fText="",color='C',code=setPen(9)},--B9
|
||||
WIDGET.newButton{name="b10", x=660, y=210,w=75,fText="",color='N',code=setPen(10)},--B10
|
||||
WIDGET.newButton{name="b11", x=740, y=210,w=75,fText="",color='S',code=setPen(11)},--B11
|
||||
WIDGET.newButton{name="b12", x=820, y=210,w=75,fText="",color='B',code=setPen(12)},--B12
|
||||
WIDGET.newButton{name="b13", x=900, y=210,w=75,fText="",color='V',code=setPen(13)},--B13
|
||||
WIDGET.newButton{name="b14", x=980, y=210,w=75,fText="",color='P',code=setPen(14)},--B14
|
||||
WIDGET.newButton{name="b15", x=1060, y=210,w=75,fText="",color='M',code=setPen(15)},--B15
|
||||
WIDGET.newButton{name="b16", x=1140, y=210,w=75,fText="",color='W',code=setPen(16)},--B16
|
||||
|
||||
WIDGET.newButton{name="b17", x=580, y=290,w=75,fText="[ ]",color="dH", code=setPen(17)},--BONE
|
||||
WIDGET.newButton{name="b18", x=660, y=290,w=75,fText="N", color="D", code=setPen(18)},--HIDE
|
||||
WIDGET.newButton{name="b19", x=740, y=290,w=75,fText="B", color="lY", code=setPen(19)},--BOMB
|
||||
WIDGET.newButton{name="b20", x=820, y=290,w=75,fText="_", color="H", code=setPen(20)},--GB1
|
||||
WIDGET.newButton{name="b21", x=900, y=290,w=75,fText="_", color="lH", code=setPen(21)},--GB2
|
||||
WIDGET.newButton{name="b22", x=980, y=290,w=75,fText="_", color="dV", code=setPen(22)},--GB3
|
||||
WIDGET.newButton{name="b23", x=1060, y=290,w=75,fText="_", color="dR", code=setPen(23)},--GB4
|
||||
WIDGET.newButton{name="b24", x=1140, y=290,w=75,fText="_", color="dG", code=setPen(24)},--GB5
|
||||
WIDGET.newButton{name="b17", x=580, y=290,w=75,fText="[ ]",color='dH', code=setPen(17)},--BONE
|
||||
WIDGET.newButton{name="b18", x=660, y=290,w=75,fText="N", color='D', code=setPen(18)},--HIDE
|
||||
WIDGET.newButton{name="b19", x=740, y=290,w=75,fText="B", color='lY', code=setPen(19)},--BOMB
|
||||
WIDGET.newButton{name="b20", x=820, y=290,w=75,fText="_", color='H', code=setPen(20)},--GB1
|
||||
WIDGET.newButton{name="b21", x=900, y=290,w=75,fText="_", color='lH', code=setPen(21)},--GB2
|
||||
WIDGET.newButton{name="b22", x=980, y=290,w=75,fText="_", color='dV', code=setPen(22)},--GB3
|
||||
WIDGET.newButton{name="b23", x=1060, y=290,w=75,fText="_", color='dR', code=setPen(23)},--GB4
|
||||
WIDGET.newButton{name="b24", x=1140, y=290,w=75,fText="_", color='dG', code=setPen(24)},--GB5
|
||||
|
||||
WIDGET.newButton{name="any", x=600, y=400,w=120,color="lH", font=40,code=setPen(0)},
|
||||
WIDGET.newButton{name="space", x=730, y=400,w=120,color="H", font=65,code=setPen(-1)},
|
||||
WIDGET.newButton{name="smart", x=860, y=400,w=120,color="lG", font=30,code=setPen(-2)},
|
||||
WIDGET.newButton{name="push", x=990, y=400,w=120,h=120,color="lY",font=20,code=pressKey"k"},
|
||||
WIDGET.newButton{name="del", x=1120, y=400,w=120,h=120,color="lY",font=20,code=pressKey"l"},
|
||||
WIDGET.newButton{name="any", x=600, y=400,w=120,color='lH', font=40,code=setPen(0)},
|
||||
WIDGET.newButton{name="space", x=730, y=400,w=120,color='H', font=65,code=setPen(-1)},
|
||||
WIDGET.newButton{name="smart", x=860, y=400,w=120,color='lG', font=30,code=setPen(-2)},
|
||||
WIDGET.newButton{name="push", x=990, y=400,w=120,h=120,color='lY',font=20,code=pressKey"k"},
|
||||
WIDGET.newButton{name="del", x=1120, y=400,w=120,h=120,color='lY',font=20,code=pressKey"l"},
|
||||
|
||||
WIDGET.newButton{name="copy", x=730, y=530,w=120,color="lR", font=35,code=pressKey"cC"},
|
||||
WIDGET.newButton{name="paste", x=860, y=530,w=120,color="lB", font=35,code=pressKey"cV"},
|
||||
WIDGET.newButton{name="clear", x=990, y=530,w=120,color="Z", font=40,code=pressKey"delete"},
|
||||
WIDGET.newButton{name="copy", x=730, y=530,w=120,color='lR', font=35,code=pressKey"cC"},
|
||||
WIDGET.newButton{name="paste", x=860, y=530,w=120,color='lB', font=35,code=pressKey"cV"},
|
||||
WIDGET.newButton{name="clear", x=990, y=530,w=120,color='Z', font=40,code=pressKey"delete"},
|
||||
WIDGET.newSwitch{name="demo", x=755, y=640,disp=function()return demo end,code=function()demo=not demo end},
|
||||
|
||||
WIDGET.newButton{name="newPg", x=100, y=110,w=160,h=110,color="N",font=20,code=pressKey"n"},
|
||||
WIDGET.newButton{name="delPg", x=100, y=230,w=160,h=110,color="lR",font=20,code=pressKey"m"},
|
||||
WIDGET.newButton{name="prevPg", x=100, y=350,w=160,h=110,color="lG",font=20,code=pressKey"pageup",hide=function()return page==1 end},
|
||||
WIDGET.newButton{name="nextPg", x=100, y=470,w=160,h=110,color="lG",font=20,code=pressKey"pagedown",hide=function()return page==#FIELD end},
|
||||
WIDGET.newButton{name="newPg", x=100, y=110,w=160,h=110,color='N',font=20,code=pressKey"n"},
|
||||
WIDGET.newButton{name="delPg", x=100, y=230,w=160,h=110,color='lR',font=20,code=pressKey"m"},
|
||||
WIDGET.newButton{name="prevPg", x=100, y=350,w=160,h=110,color='lG',font=20,code=pressKey"pageup",hide=function()return page==1 end},
|
||||
WIDGET.newButton{name="nextPg", x=100, y=470,w=160,h=110,color='lG',font=20,code=pressKey"pagedown",hide=function()return page==#FIELD end},
|
||||
|
||||
WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ function scene.keyDown(key)
|
||||
end
|
||||
cur=0
|
||||
sure=0
|
||||
SFX.play("finesseError",.7)
|
||||
SFX.play('finesseError',.7)
|
||||
else
|
||||
sure=50
|
||||
end
|
||||
@@ -77,9 +77,9 @@ function scene.keyDown(key)
|
||||
end
|
||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||
local str=sys.getClipboardText()
|
||||
local p=str:find":"--ptr*
|
||||
local p=str:find(":")--ptr*
|
||||
if p then
|
||||
if not str:sub(1,p-1):find"Target"then
|
||||
if not str:sub(1,p-1):find("Target")then
|
||||
LOG.print(text.pasteWrongPlace)
|
||||
end
|
||||
str=str:sub(p+1)
|
||||
@@ -92,7 +92,7 @@ function scene.keyDown(key)
|
||||
end
|
||||
elseif key=="escape"then
|
||||
SCN.back()
|
||||
elseif type(key)=="number"then
|
||||
elseif type(key)=='number'then
|
||||
local p=cur+1
|
||||
while MISSION[p]==key do p=p+1 end
|
||||
ins(MISSION,p,key)
|
||||
@@ -108,7 +108,7 @@ function scene.keyDown(key)
|
||||
if missionEnum[input]then
|
||||
cur=cur+1
|
||||
ins(MISSION,cur,missionEnum[input])
|
||||
SFX.play("lock")
|
||||
SFX.play('lock')
|
||||
input=""
|
||||
elseif #input>1 or not legalInput[input]then
|
||||
input=""
|
||||
@@ -124,7 +124,7 @@ function scene.draw()
|
||||
--Draw frame
|
||||
gc.setLineWidth(4)
|
||||
gc.setColor(1,1,1)
|
||||
gc.rectangle("line",60,110,1160,170)
|
||||
gc.rectangle('line',60,110,1160,170)
|
||||
|
||||
--Draw inputing target
|
||||
setFont(30)
|
||||
@@ -189,8 +189,8 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=520,y=5,font=70,align="R"},
|
||||
WIDGET.newText{name="subTitle", x=530,y=50,font=35,align="L",color="H"},
|
||||
WIDGET.newText{name="title", x=520,y=5,font=70,align='R'},
|
||||
WIDGET.newText{name="subTitle", x=530,y=50,font=35,align='L',color='H'},
|
||||
|
||||
WIDGET.newKey{name="_1", x=800,y=540,w=90,font=50,code=pressKey(01)},
|
||||
WIDGET.newKey{name="_2", x=900,y=540,w=90,font=50,code=pressKey(02)},
|
||||
@@ -229,13 +229,13 @@ scene.widgetList={
|
||||
WIDGET.newKey{name="O4", x=600,y=640,w=90,font=50,code=pressKey(64)},
|
||||
WIDGET.newKey{name="I4", x=700,y=640,w=90,font=50,code=pressKey(74)},
|
||||
|
||||
WIDGET.newKey{name="left", x=800, y=440,w=90, color="lG",font=55,code=pressKey"left"},
|
||||
WIDGET.newKey{name="right", x=900, y=440,w=90, color="lG",font=55,code=pressKey"right"},
|
||||
WIDGET.newKey{name="ten", x=1000, y=440,w=90, color="lG",font=40,code=pressKey"ten"},
|
||||
WIDGET.newKey{name="backsp", x=1000, y=540,w=90, color="lY",font=50,code=pressKey"backspace"},
|
||||
WIDGET.newKey{name="reset", x=1000, y=640,w=90, color="lY",font=50,code=pressKey"delete"},
|
||||
WIDGET.newButton{name="copy", x=1140, y=440,w=170,h=80, color="lR",font=40,code=pressKey"cC",hide=function()return #MISSION==0 end},
|
||||
WIDGET.newButton{name="paste", x=1140, y=540,w=170,h=80, color="lB",font=40,code=pressKey"cV"},
|
||||
WIDGET.newKey{name="left", x=800, y=440,w=90, color='lG',font=55,code=pressKey"left"},
|
||||
WIDGET.newKey{name="right", x=900, y=440,w=90, color='lG',font=55,code=pressKey"right"},
|
||||
WIDGET.newKey{name="ten", x=1000, y=440,w=90, color='lG',font=40,code=pressKey"ten"},
|
||||
WIDGET.newKey{name="backsp", x=1000, y=540,w=90, color='lY',font=50,code=pressKey"backspace"},
|
||||
WIDGET.newKey{name="reset", x=1000, y=640,w=90, color='lY',font=50,code=pressKey"delete"},
|
||||
WIDGET.newButton{name="copy", x=1140, y=440,w=170,h=80, color='lR',font=40,code=pressKey"cC",hide=function()return #MISSION==0 end},
|
||||
WIDGET.newButton{name="paste", x=1140, y=540,w=170,h=80, color='lB',font=40,code=pressKey"cV"},
|
||||
WIDGET.newSwitch{name="mission",x=1150, y=350,disp=CUSval("missionKill"),code=CUSrev("missionKill")},
|
||||
|
||||
WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80, font=40,code=backScene},
|
||||
|
||||
@@ -71,7 +71,7 @@ function scene.keyDown(key)
|
||||
end
|
||||
cur=0
|
||||
sure=0
|
||||
SFX.play("finesseError",.7)
|
||||
SFX.play('finesseError',.7)
|
||||
else
|
||||
sure=50
|
||||
end
|
||||
@@ -92,9 +92,9 @@ function scene.keyDown(key)
|
||||
end
|
||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||
local str=sys.getClipboardText()
|
||||
local p=str:find":"--ptr*
|
||||
local p=str:find(":")--ptr*
|
||||
if p then
|
||||
if not str:sub(1,p-1):find"SEQ"then
|
||||
if not str:sub(1,p-1):find("SEQ")then
|
||||
LOG.print(text.pasteWrongPlace)
|
||||
end
|
||||
str=str:sub(p+1)
|
||||
@@ -107,7 +107,7 @@ function scene.keyDown(key)
|
||||
end
|
||||
elseif key=="escape"then
|
||||
SCN.back()
|
||||
elseif type(key)=="number"then
|
||||
elseif type(key)=='number'then
|
||||
cur=cur+1
|
||||
ins(BAG,cur,key)
|
||||
elseif #key==1 then
|
||||
@@ -117,7 +117,7 @@ function scene.keyDown(key)
|
||||
while BAG[p]==key do p=p+1 end
|
||||
ins(BAG,p,key)
|
||||
cur=p
|
||||
SFX.play("lock")
|
||||
SFX.play('lock')
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -130,7 +130,7 @@ function scene.draw()
|
||||
--Draw frame
|
||||
gc.setColor(1,1,1)
|
||||
gc.setLineWidth(4)
|
||||
gc.rectangle("line",100,110,1080,260)
|
||||
gc.rectangle('line',100,110,1080,260)
|
||||
|
||||
--Draw sequence
|
||||
local miniBlock=TEXTURE.miniBlock
|
||||
@@ -190,11 +190,11 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title",x=520,y=5,font=70,align="R"},
|
||||
WIDGET.newText{name="subTitle",x=530,y=50,font=35,align="L",color="H"},
|
||||
WIDGET.newText{name="title",x=520,y=5,font=70,align='R'},
|
||||
WIDGET.newText{name="subTitle",x=530,y=50,font=35,align='L',color='H'},
|
||||
|
||||
WIDGET.newSelector{name="sequence",x=1080,y=60,w=200,color="Y",
|
||||
list={"bag","his4","c2","rnd","mess","reverb","loop","fixed"},
|
||||
WIDGET.newSelector{name="sequence",x=1080,y=60,w=200,color='Y',
|
||||
list={'bag','his4','c2','rnd','mess','reverb','loop','fixed'},
|
||||
disp=CUSval("sequence"),
|
||||
code=CUSsto("sequence")
|
||||
},
|
||||
@@ -206,40 +206,40 @@ scene.widgetList={
|
||||
WIDGET.newKey{name="T", x=440,y=460,w=80,font=50,code=pressKey(5)},
|
||||
WIDGET.newKey{name="O", x=520,y=460,w=80,font=50,code=pressKey(6)},
|
||||
WIDGET.newKey{name="I", x=600,y=460,w=80,font=50,code=pressKey(7)},
|
||||
WIDGET.newKey{name="left", x=680,y=460,w=80,color="lG",font=55,code=pressKey"left"},
|
||||
WIDGET.newKey{name="right", x=760,y=460,w=80,color="lG",font=55,code=pressKey"right"},
|
||||
WIDGET.newKey{name="ten", x=840,y=460,w=80,color="lG",font=40,code=pressKey"ten"},
|
||||
WIDGET.newKey{name="backsp",x=920,y=460,w=80,color="lY",font=50,code=pressKey"backspace"},
|
||||
WIDGET.newKey{name="reset", x=1000,y=460,w=80,color="lY",font=25,code=pressKey"delete"},
|
||||
WIDGET.newKey{name="left", x=680,y=460,w=80,color='lG',font=55,code=pressKey"left"},
|
||||
WIDGET.newKey{name="right", x=760,y=460,w=80,color='lG',font=55,code=pressKey"right"},
|
||||
WIDGET.newKey{name="ten", x=840,y=460,w=80,color='lG',font=40,code=pressKey"ten"},
|
||||
WIDGET.newKey{name="backsp",x=920,y=460,w=80,color='lY',font=50,code=pressKey"backspace"},
|
||||
WIDGET.newKey{name="reset", x=1000,y=460,w=80,color='lY',font=25,code=pressKey"delete"},
|
||||
|
||||
WIDGET.newKey{name="Z5", x=120,y=540,w=80,color="lH",font=50,code=pressKey(8)},
|
||||
WIDGET.newKey{name="S5", x=200,y=540,w=80,color="lH",font=50,code=pressKey(9)},
|
||||
WIDGET.newKey{name="P", x=280,y=540,w=80,color="lH",font=50,code=pressKey(10)},
|
||||
WIDGET.newKey{name="Q", x=360,y=540,w=80,color="lH",font=50,code=pressKey(11)},
|
||||
WIDGET.newKey{name="F", x=440,y=540,w=80,color="lH",font=50,code=pressKey(12)},
|
||||
WIDGET.newKey{name="E", x=520,y=540,w=80,color="lH",font=50,code=pressKey(13)},
|
||||
WIDGET.newKey{name="T5", x=600,y=540,w=80,color="lH",font=50,code=pressKey(14)},
|
||||
WIDGET.newKey{name="U", x=680,y=540,w=80,color="lH",font=50,code=pressKey(15)},
|
||||
WIDGET.newKey{name="V", x=760,y=540,w=80,color="lH",font=50,code=pressKey(16)},
|
||||
WIDGET.newKey{name="I3", x=840,y=540,w=80,color="H",font=50,code=pressKey(26)},
|
||||
WIDGET.newKey{name="C", x=920,y=540,w=80,color="H",font=50,code=pressKey(27)},
|
||||
WIDGET.newKey{name="rnd", x=1000,y=540,w=80,color="R",font=25,code=pressKey"="},
|
||||
WIDGET.newKey{name="Z5", x=120,y=540,w=80,color='lH',font=50,code=pressKey(8)},
|
||||
WIDGET.newKey{name="S5", x=200,y=540,w=80,color='lH',font=50,code=pressKey(9)},
|
||||
WIDGET.newKey{name="P", x=280,y=540,w=80,color='lH',font=50,code=pressKey(10)},
|
||||
WIDGET.newKey{name="Q", x=360,y=540,w=80,color='lH',font=50,code=pressKey(11)},
|
||||
WIDGET.newKey{name="F", x=440,y=540,w=80,color='lH',font=50,code=pressKey(12)},
|
||||
WIDGET.newKey{name="E", x=520,y=540,w=80,color='lH',font=50,code=pressKey(13)},
|
||||
WIDGET.newKey{name="T5", x=600,y=540,w=80,color='lH',font=50,code=pressKey(14)},
|
||||
WIDGET.newKey{name="U", x=680,y=540,w=80,color='lH',font=50,code=pressKey(15)},
|
||||
WIDGET.newKey{name="V", x=760,y=540,w=80,color='lH',font=50,code=pressKey(16)},
|
||||
WIDGET.newKey{name="I3", x=840,y=540,w=80,color='H',font=50,code=pressKey(26)},
|
||||
WIDGET.newKey{name="C", x=920,y=540,w=80,color='H',font=50,code=pressKey(27)},
|
||||
WIDGET.newKey{name="rnd", x=1000,y=540,w=80,color='R',font=25,code=pressKey"="},
|
||||
|
||||
WIDGET.newKey{name="W", x=120,y=620,w=80,color="lH",font=50,code=pressKey(17)},
|
||||
WIDGET.newKey{name="X", x=200,y=620,w=80,color="lH",font=50,code=pressKey(18)},
|
||||
WIDGET.newKey{name="J5", x=280,y=620,w=80,color="lH",font=50,code=pressKey(19)},
|
||||
WIDGET.newKey{name="L5", x=360,y=620,w=80,color="lH",font=50,code=pressKey(20)},
|
||||
WIDGET.newKey{name="R", x=440,y=620,w=80,color="lH",font=50,code=pressKey(21)},
|
||||
WIDGET.newKey{name="Y", x=520,y=620,w=80,color="lH",font=50,code=pressKey(22)},
|
||||
WIDGET.newKey{name="N", x=600,y=620,w=80,color="lH",font=50,code=pressKey(23)},
|
||||
WIDGET.newKey{name="H", x=680,y=620,w=80,color="lH",font=50,code=pressKey(24)},
|
||||
WIDGET.newKey{name="I5", x=760,y=620,w=80,color="lH",font=50,code=pressKey(25)},
|
||||
WIDGET.newKey{name="I2", x=840,y=620,w=80,color="dH",font=50,code=pressKey(28)},
|
||||
WIDGET.newKey{name="O1", x=920,y=620,w=80,color="dH",font=50,code=pressKey(29)},
|
||||
WIDGET.newKey{name="W", x=120,y=620,w=80,color='lH',font=50,code=pressKey(17)},
|
||||
WIDGET.newKey{name="X", x=200,y=620,w=80,color='lH',font=50,code=pressKey(18)},
|
||||
WIDGET.newKey{name="J5", x=280,y=620,w=80,color='lH',font=50,code=pressKey(19)},
|
||||
WIDGET.newKey{name="L5", x=360,y=620,w=80,color='lH',font=50,code=pressKey(20)},
|
||||
WIDGET.newKey{name="R", x=440,y=620,w=80,color='lH',font=50,code=pressKey(21)},
|
||||
WIDGET.newKey{name="Y", x=520,y=620,w=80,color='lH',font=50,code=pressKey(22)},
|
||||
WIDGET.newKey{name="N", x=600,y=620,w=80,color='lH',font=50,code=pressKey(23)},
|
||||
WIDGET.newKey{name="H", x=680,y=620,w=80,color='lH',font=50,code=pressKey(24)},
|
||||
WIDGET.newKey{name="I5", x=760,y=620,w=80,color='lH',font=50,code=pressKey(25)},
|
||||
WIDGET.newKey{name="I2", x=840,y=620,w=80,color='dH',font=50,code=pressKey(28)},
|
||||
WIDGET.newKey{name="O1", x=920,y=620,w=80,color='dH',font=50,code=pressKey(29)},
|
||||
|
||||
|
||||
WIDGET.newButton{name="copy",x=1140,y=460,w=170,h=80,color="lR",font=40,code=pressKey"cC",hide=function()return #BAG==0 end},
|
||||
WIDGET.newButton{name="paste",x=1140,y=550,w=170,h=80,color="lB",font=40,code=pressKey"cV"},
|
||||
WIDGET.newButton{name="copy",x=1140,y=460,w=170,h=80,color='lR',font=40,code=pressKey"cC",hide=function()return #BAG==0 end},
|
||||
WIDGET.newButton{name="paste",x=1140,y=550,w=170,h=80,color='lB',font=40,code=pressKey"cV"},
|
||||
WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ scene.touchDown=NULL
|
||||
function scene.update(dt)
|
||||
timer=timer-dt*.8
|
||||
if timer<0 then
|
||||
SFX.play("click")
|
||||
SCN.swapTo("game","none")
|
||||
SFX.play('click')
|
||||
SCN.swapTo('game','none')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -26,14 +26,14 @@ function scene.draw()
|
||||
|
||||
--Gray screen cover
|
||||
gc.setColor(.15,.15,.15,timer*1.26)
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.origin()
|
||||
gc.rectangle("fill",0,0,SCR.w,SCR.h)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
gc.pop()
|
||||
|
||||
--Pie counter
|
||||
gc.setColor(1,1,1,4*(1-timer))
|
||||
gc.arc("fill","pie",640,360,160,-1.5708,timer*6.2832-1.5708)
|
||||
gc.arc('fill','pie',640,360,160,-1.5708,timer*6.2832-1.5708)
|
||||
end
|
||||
|
||||
return scene
|
||||
@@ -50,7 +50,7 @@ local function search()
|
||||
end
|
||||
end
|
||||
if #result>0 then
|
||||
SFX.play("reach")
|
||||
SFX.play('reach')
|
||||
end
|
||||
url=getList()[selected][5]
|
||||
lastSearch=input
|
||||
@@ -69,7 +69,7 @@ function scene.sceneInit()
|
||||
|
||||
lastSearch=false
|
||||
TASK.new(function()YIELD()WIDGET.sel=inputBox end)
|
||||
BG.set("rainbow")
|
||||
BG.set('rainbow')
|
||||
end
|
||||
|
||||
function scene.wheelMoved(_,y)
|
||||
@@ -100,7 +100,7 @@ function scene.keyDown(key)
|
||||
if #inputBox.value>0 then
|
||||
clearResult()
|
||||
inputBox:clear()
|
||||
SFX.play("hold")
|
||||
SFX.play('hold')
|
||||
end
|
||||
elseif key=="backspace"then
|
||||
WIDGET.keyPressed("backspace")
|
||||
@@ -151,7 +151,7 @@ function scene.draw()
|
||||
|
||||
setFont(30)
|
||||
gc.setColor(1,1,1,.4+.2*sin(TIME()*4))
|
||||
gc.rectangle("fill",20,143+35*(selected-scrollPos),280,35)
|
||||
gc.rectangle('fill',20,143+35*(selected-scrollPos),280,35)
|
||||
|
||||
setFont(30)
|
||||
for i=1,min(#list,15)do
|
||||
@@ -169,8 +169,8 @@ function scene.draw()
|
||||
|
||||
gc.setLineWidth(4)
|
||||
gc.setColor(1,1,1)
|
||||
gc.rectangle("line",300,180,958,526)
|
||||
gc.rectangle("line",20,180,280,526)
|
||||
gc.rectangle('line',300,180,958,526)
|
||||
gc.rectangle('line',20,180,280,526)
|
||||
|
||||
if waiting>0 then
|
||||
local r=TIME()*2
|
||||
@@ -181,7 +181,7 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=20, y=5,font=70,align="L"},
|
||||
WIDGET.newText{name="title", x=20, y=5,font=70,align='L'},
|
||||
inputBox,
|
||||
WIDGET.newKey{name="link", x=1150, y=655,w=200,h=80,font=35,code=pressKey"link",hide=function()return not url end},
|
||||
WIDGET.newKey{name="up", x=1130, y=460,w=60,h=90,font=35,code=pressKey"up",hide=not MOBILE},
|
||||
|
||||
@@ -19,7 +19,7 @@ end
|
||||
|
||||
scene.mouseDown=NULL
|
||||
local function restart()
|
||||
resetGameData(PLAYERS[1].frameRun<240 and"q")
|
||||
resetGameData(PLAYERS[1].frameRun<240 and'q')
|
||||
noKey=GAME.replaying
|
||||
noTouch=noKey
|
||||
end
|
||||
@@ -162,10 +162,10 @@ local function drawAtkPointer(x,y)
|
||||
t=sin(t*20)
|
||||
|
||||
gc.setColor(.2,.7+t*.2,1,.6+t*.4)
|
||||
gc.circle("fill",x,y,25,6)
|
||||
gc.circle('fill',x,y,25,6)
|
||||
|
||||
gc.setColor(0,.6,1,.8-a)
|
||||
gc.circle("line",x,y,30*(1+a),6)
|
||||
gc.circle('line',x,y,30*(1+a),6)
|
||||
end
|
||||
function scene.draw()
|
||||
drawFWM()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("cubes")
|
||||
BG.set('cubes')
|
||||
WIDGET.active.texts:setTexts(require"parts.updateLog")
|
||||
if newVersionLaunch then
|
||||
newVersionLaunch=false
|
||||
|
||||
@@ -13,11 +13,11 @@ function scene.sceneInit()
|
||||
animeType={}for i=1,8 do animeType[i]=rnd(5)end--Random animation type
|
||||
end
|
||||
|
||||
function scene.mouseDown(_,_,k)
|
||||
function scene.mouseDown()
|
||||
if newVersionLaunch then
|
||||
SCN.push(SETTING.simpMode and"main_simple"or"main")
|
||||
SCN.swapTo("history","fade")
|
||||
LOG.print(text.newVersion,"warn",COLOR.lB)
|
||||
SCN.swapTo('history','fade')
|
||||
LOG.print(text.newVersion,'warn',COLOR.lB)
|
||||
else
|
||||
SCN.go(SETTING.simpMode and"main_simple"or"main")
|
||||
end
|
||||
@@ -27,8 +27,8 @@ function scene.touchDown()
|
||||
end
|
||||
function scene.keyDown(key)
|
||||
if key=="escape"then
|
||||
VOC.play("bye")
|
||||
SCN.swapTo("quit","slowFade")
|
||||
VOC.play('bye')
|
||||
SCN.swapTo('quit','slowFade')
|
||||
else
|
||||
scene.mouseDown()
|
||||
end
|
||||
@@ -53,19 +53,19 @@ function scene.draw()
|
||||
gc.setLineWidth(4)
|
||||
end
|
||||
local L=title
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.translate(126,226)
|
||||
for i=1,8 do
|
||||
local t=t1-i*15
|
||||
if t>0 then
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.setColor(1,1,1,min(t*.025,1))
|
||||
titleTransform[animeType[i]](t,i)
|
||||
local dt=(t1+62-5*i)%300
|
||||
if dt<20 then
|
||||
gc.translate(0,math.abs(10-dt)-10)
|
||||
end
|
||||
gc.polygon("line",L[i])
|
||||
gc.polygon('line',L[i])
|
||||
gc.pop()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -33,7 +33,7 @@ local function upFloor()
|
||||
progress=progress+1
|
||||
if light[3*progress+3]then
|
||||
light[3*progress+3]=false
|
||||
SFX.play("click",.3)
|
||||
SFX.play('click',.3)
|
||||
end
|
||||
end
|
||||
local loadingThread=coroutine.wrap(function()
|
||||
@@ -149,7 +149,7 @@ local loadingThread=coroutine.wrap(function()
|
||||
|
||||
upFloor()
|
||||
if not MODES[STAT.lastPlay]then
|
||||
STAT.lastPlay="sprint_10l"
|
||||
STAT.lastPlay='sprint_10l'
|
||||
end
|
||||
|
||||
upFloor()
|
||||
@@ -157,7 +157,7 @@ local loadingThread=coroutine.wrap(function()
|
||||
if newVersionLaunch then--Delete old ranks & Unlock modes which should be locked
|
||||
for name,rank in next,RANKS do
|
||||
local M=MODES[name]
|
||||
if type(rank)~="number"then
|
||||
if type(rank)~='number'then
|
||||
RANKS[name]=nil
|
||||
elseif M and M.unlock and rank>0 then
|
||||
for _,unlockName in next,M.unlock do
|
||||
@@ -170,10 +170,10 @@ local loadingThread=coroutine.wrap(function()
|
||||
RANKS[name]=nil
|
||||
end
|
||||
end
|
||||
FILE.save(RANKS,"conf/unlock","q")
|
||||
FILE.save(RANKS,"conf/unlock",'q')
|
||||
end
|
||||
|
||||
DAILYLAUNCH=freshDate("q")
|
||||
DAILYLAUNCH=freshDate'q'
|
||||
if DAILYLAUNCH then
|
||||
logoColor1=COLOR.S
|
||||
logoColor2=COLOR.lS
|
||||
@@ -195,8 +195,8 @@ local loadingThread=coroutine.wrap(function()
|
||||
upFloor()
|
||||
end
|
||||
if progress==25 then
|
||||
SFX.play("welcome_sfx")
|
||||
VOC.play("welcome_voc")
|
||||
SFX.play('welcome_sfx')
|
||||
VOC.play('welcome_voc')
|
||||
THEME.fresh()
|
||||
LOADED=true
|
||||
return
|
||||
@@ -265,7 +265,7 @@ function scene.update(dt)
|
||||
skip=skip-1
|
||||
end
|
||||
if openTime>=3.26 and not SCN.swapping then
|
||||
SCN.swapTo("intro")
|
||||
SCN.swapTo('intro')
|
||||
love.keyboard.setKeyRepeat(true)
|
||||
end
|
||||
end
|
||||
@@ -274,13 +274,13 @@ end
|
||||
|
||||
local function doorStencil()
|
||||
local dx=300*(1-math.min(openTime/1.26-1,0)^2)
|
||||
gc.rectangle("fill",640-dx,0,2*dx,720)
|
||||
gc.rectangle('fill',640-dx,0,2*dx,720)
|
||||
end
|
||||
function scene.draw()
|
||||
--Wall
|
||||
gc.clear(.5,.5,.5)
|
||||
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
if openTime>2.26 then
|
||||
gc.translate(640,360)
|
||||
gc.scale(1+(openTime-2.26)^1.8)
|
||||
@@ -291,11 +291,11 @@ function scene.draw()
|
||||
if progress==25 then
|
||||
--Outside background
|
||||
gc.setColor(.15,.15,.15)
|
||||
gc.rectangle("fill",340,0,600,720)
|
||||
gc.rectangle('fill',340,0,600,720)
|
||||
|
||||
gc.stencil(doorStencil,"replace",1)
|
||||
gc.setStencilTest("equal",1)
|
||||
gc.push("transform")
|
||||
gc.stencil(doorStencil,'replace',1)
|
||||
gc.setStencilTest('equal',1)
|
||||
gc.push('transform')
|
||||
|
||||
--Cool camera
|
||||
gc.translate(640,360)
|
||||
@@ -323,17 +323,17 @@ function scene.draw()
|
||||
if openTime>.3 and openTime<1.6 then
|
||||
local w=(1.6-openTime)/1.3
|
||||
gc.setColor(1,1,1,w^2)
|
||||
gc.rectangle("fill",340,360*w^2,600,720*(1-w^2))
|
||||
gc.rectangle('fill',340,360*w^2,600,720*(1-w^2))
|
||||
end
|
||||
gc.setStencilTest()
|
||||
end
|
||||
|
||||
--Floor info frame
|
||||
gc.setColor(.1,.1,.1)
|
||||
gc.rectangle("fill",1020,25,180,100)
|
||||
gc.rectangle('fill',1020,25,180,100)
|
||||
gc.setColor(.7,.7,.7)
|
||||
gc.setLineWidth(4)
|
||||
gc.rectangle("line",1020,25,180,100)
|
||||
gc.rectangle('line',1020,25,180,100)
|
||||
|
||||
--Floor info
|
||||
if progress>=0 then
|
||||
@@ -357,10 +357,10 @@ function scene.draw()
|
||||
setFont(25)
|
||||
for i=0,26 do
|
||||
local x,y=light[3*i+1],light[3*i+2]
|
||||
gc.setColor(COLOR[i==progress and"H"or light[3*i+3]and"dO"or"dH"])
|
||||
gc.circle("fill",x,y,23)
|
||||
gc.setColor(COLOR[i==progress and'H'or light[3*i+3]and'dO'or'dH'])
|
||||
gc.circle('fill',x,y,23)
|
||||
gc.setColor(.16,.16,.16)
|
||||
gc.circle("line",x,y,23)
|
||||
gc.circle('line',x,y,23)
|
||||
gc.setColor(1,1,1)
|
||||
mStr(i+1,x,y-18)
|
||||
end
|
||||
@@ -369,8 +369,8 @@ function scene.draw()
|
||||
for i=1,0,-1 do
|
||||
gc.setColor(.3,.3,.3)
|
||||
local dx=300*(1-math.min(math.max(openTime-i*.1,0)/1.26-1,0)^2)
|
||||
gc.rectangle("fill",340,0,300-dx,720)
|
||||
gc.rectangle("fill",940,0,dx-300,720)
|
||||
gc.rectangle('fill',340,0,300-dx,720)
|
||||
gc.rectangle('fill',940,0,dx-300,720)
|
||||
|
||||
gc.setColor(.16,.16,.16)
|
||||
gc.setLineWidth(4)
|
||||
@@ -380,14 +380,14 @@ function scene.draw()
|
||||
|
||||
--Doorframe
|
||||
gc.setColor(0,0,0)
|
||||
gc.rectangle("line",340,0,600,720)
|
||||
gc.rectangle('line',340,0,600,720)
|
||||
|
||||
--Black screen
|
||||
if blackTime>0 or openTime>3 then
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.origin()
|
||||
gc.setColor(0,0,0,blackTime+(openTime-3)*4)
|
||||
gc.rectangle("fill",0,0,SCR.w,SCR.h)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
gc.pop()
|
||||
end
|
||||
gc.pop()
|
||||
|
||||
@@ -12,8 +12,8 @@ end
|
||||
local scene={}
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=80, y=50,font=70,align="L"},
|
||||
WIDGET.newButton{name="register", x=1140, y=100,w=170,h=80,color="lY",code=function()SCN.swapTo("register","swipeR")end},
|
||||
WIDGET.newText{name="title", x=80, y=50,font=70,align='L'},
|
||||
WIDGET.newButton{name="register", x=1140, y=100,w=170,h=80,color='lY',code=function()SCN.swapTo('register','swipeR')end},
|
||||
WIDGET.newInputBox{name="email", x=380, y=200,w=500,h=60},
|
||||
WIDGET.newInputBox{name="password", x=380, y=300,w=626,h=60,secret=true,regex="[ -~]"},
|
||||
WIDGET.newKey{name="login", x=1140, y=540,w=170,h=80,font=40,code=login},
|
||||
|
||||
@@ -13,11 +13,11 @@ local widgetX0={
|
||||
}
|
||||
local consoleEntryThread=coroutine.wrap(function()
|
||||
while true do
|
||||
SFX.play("ren_"..math.random(5,6))YIELD()
|
||||
SFX.play("ren_"..math.random(7,8))YIELD()
|
||||
SFX.play("ren_"..math.random(9,10))YIELD()
|
||||
SFX.play("ren_9")SFX.play("ren_11")SFX.play("ren_mega")
|
||||
SCN.go("app_console")
|
||||
SFX.play('ren_'..math.random(5,6))YIELD()
|
||||
SFX.play('ren_'..math.random(7,8))YIELD()
|
||||
SFX.play('ren_'..math.random(9,10))YIELD()
|
||||
SFX.play('ren_9')SFX.play('ren_11')SFX.play('ren_mega')
|
||||
SCN.go('app_console')
|
||||
YIELD()
|
||||
end
|
||||
end)
|
||||
@@ -54,7 +54,7 @@ end
|
||||
function scene.keyDown(key)
|
||||
if key=="1"then
|
||||
if testButton(1)then
|
||||
SCN.go("mode")
|
||||
SCN.go('mode')
|
||||
end
|
||||
elseif key=="q"then
|
||||
if testButton(2)then
|
||||
@@ -64,52 +64,52 @@ function scene.keyDown(key)
|
||||
if testButton(3)then
|
||||
if NET.connected then
|
||||
if NET.allow_online then
|
||||
if WS.status("user")=="running"then
|
||||
if WS.status('user')=='running'then
|
||||
NET.getAccessToken()
|
||||
else
|
||||
SCN.go("login")
|
||||
SCN.go('login')
|
||||
end
|
||||
else
|
||||
TEXT.show(text.needUpdate,640,450,60,"flicker")
|
||||
SFX.play("finesseError")
|
||||
TEXT.show(text.needUpdate,640,450,60,'flicker')
|
||||
SFX.play('finesseError')
|
||||
end
|
||||
else
|
||||
TEXT.show(text.noInternet,640,450,60,"flicker")
|
||||
TEXT.show(text.noInternet,640,450,60,'flicker')
|
||||
NET.wsconn_app()
|
||||
SFX.play("finesseError")
|
||||
SFX.play('finesseError')
|
||||
end
|
||||
end
|
||||
elseif key=="z"then
|
||||
if testButton(4)then
|
||||
SCN.go("customGame")
|
||||
SCN.go('customGame')
|
||||
end
|
||||
elseif key=="-"then
|
||||
if testButton(5)then
|
||||
SCN.go("setting_game")
|
||||
SCN.go('setting_game')
|
||||
end
|
||||
elseif key=="p"then
|
||||
if testButton(6)then
|
||||
SCN.go("stat")
|
||||
SCN.go('stat')
|
||||
end
|
||||
elseif key=="l"then
|
||||
if testButton(7)then
|
||||
SCN.go("dict")
|
||||
SCN.go('dict')
|
||||
end
|
||||
elseif key==","then
|
||||
if testButton(8)then
|
||||
SCN.go("manual")
|
||||
SCN.go('manual')
|
||||
end
|
||||
elseif key=="2"then
|
||||
if testButton(9)then
|
||||
SCN.go("music")
|
||||
SCN.go('music')
|
||||
end
|
||||
elseif key=="0"then
|
||||
if testButton(10)then
|
||||
SCN.go("lang")
|
||||
SCN.go('lang')
|
||||
end
|
||||
elseif key=="x"then
|
||||
if testButton(11)then
|
||||
SCN.go("about")
|
||||
SCN.go('about')
|
||||
end
|
||||
elseif key=="escape"then
|
||||
if testButton(12)then
|
||||
@@ -134,7 +134,7 @@ function scene.update(dt)
|
||||
end
|
||||
|
||||
local function tipStencil()
|
||||
gc.rectangle("fill",0,0,tipLength,42)
|
||||
gc.rectangle('fill',0,0,tipLength,42)
|
||||
end
|
||||
function scene.draw()
|
||||
--Version
|
||||
@@ -147,12 +147,12 @@ function scene.draw()
|
||||
mDraw(TEXTURE.title_color,640,60,nil,.43)
|
||||
|
||||
--Tip
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.translate(260,650)
|
||||
gc.setLineWidth(2)
|
||||
gc.rectangle("line",0,0,tipLength,42)
|
||||
gc.stencil(tipStencil,"replace",1)
|
||||
gc.setStencilTest("equal",1)
|
||||
gc.rectangle('line',0,0,tipLength,42)
|
||||
gc.stencil(tipStencil,'replace',1)
|
||||
gc.setStencilTest('equal',1)
|
||||
gc.draw(tip,0+scrollX,0)
|
||||
gc.setColor(1,1,1,.2)
|
||||
gc.setStencilTest()
|
||||
@@ -174,20 +174,20 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="offline",x=-1200,y=210,w=800,h=100, color="lR",font=45,align="R",edge=30,code=pressKey"1"},
|
||||
WIDGET.newButton{name="qplay", x=-1200,y=330,w=800,h=100, color="lM",font=40,align="R",edge=30,code=pressKey"q"},
|
||||
WIDGET.newButton{name="online", x=-1200,y=450,w=800,h=100, color="lV",font=45,align="R",edge=30,code=pressKey"a"},
|
||||
WIDGET.newButton{name="custom", x=-1200,y=570,w=800,h=100, color="lS",font=45,align="R",edge=30,code=pressKey"z"},
|
||||
WIDGET.newButton{name="offline",x=-1200,y=210,w=800,h=100, color='lR',font=45,align='R',edge=30,code=pressKey"1"},
|
||||
WIDGET.newButton{name="qplay", x=-1200,y=330,w=800,h=100, color='lM',font=40,align='R',edge=30,code=pressKey"q"},
|
||||
WIDGET.newButton{name="online", x=-1200,y=450,w=800,h=100, color='lV',font=45,align='R',edge=30,code=pressKey"a"},
|
||||
WIDGET.newButton{name="custom", x=-1200,y=570,w=800,h=100, color='lS',font=45,align='R',edge=30,code=pressKey"z"},
|
||||
|
||||
WIDGET.newButton{name="setting",x=2480,y=210,w=800,h=100, color="lO",font=40,align="L",edge=30,code=pressKey"-"},
|
||||
WIDGET.newButton{name="stat", x=2480,y=330,w=800,h=100, color="lL",font=40,align="L",edge=30,code=pressKey"p"},
|
||||
WIDGET.newButton{name="dict", x=2480,y=450,w=800,h=100, color="lG",font=40,align="L",edge=30,code=pressKey"l"},
|
||||
WIDGET.newButton{name="manual", x=2480,y=570,w=800,h=100, color="lC",font=40,align="L",edge=30,code=pressKey","},
|
||||
WIDGET.newButton{name="setting",x=2480,y=210,w=800,h=100, color='lO',font=40,align='L',edge=30,code=pressKey"-"},
|
||||
WIDGET.newButton{name="stat", x=2480,y=330,w=800,h=100, color='lL',font=40,align='L',edge=30,code=pressKey"p"},
|
||||
WIDGET.newButton{name="dict", x=2480,y=450,w=800,h=100, color='lG',font=40,align='L',edge=30,code=pressKey"l"},
|
||||
WIDGET.newButton{name="manual", x=2480,y=570,w=800,h=100, color='lC',font=40,align='L',edge=30,code=pressKey","},
|
||||
|
||||
WIDGET.newButton{name="music", x=130,y=80,w=200,h=90, color="lO",font=35,code=pressKey"2"},
|
||||
WIDGET.newButton{name="lang", x=300,y=80,w=90,h=90, color="lN",font=40,code=pressKey"0",fText=TEXTURE.earth},
|
||||
WIDGET.newButton{name="about", x=-110,y=670,w=600,h=70, color="lB",font=35,align="R",edge=30,code=pressKey"x"},
|
||||
WIDGET.newButton{name="back", x=1390,y=670,w=600,h=70, color="lR",font=40,align="L",edge=30,code=backScene},
|
||||
WIDGET.newButton{name="music", x=130,y=80,w=200,h=90, color='lO',font=35,code=pressKey"2"},
|
||||
WIDGET.newButton{name="lang", x=300,y=80,w=90,h=90, color='lN',font=40,code=pressKey"0",fText=TEXTURE.earth},
|
||||
WIDGET.newButton{name="about", x=-110,y=670,w=600,h=70, color='lB',font=35,align='R',edge=30,code=pressKey"x"},
|
||||
WIDGET.newButton{name="back", x=1390,y=670,w=600,h=70, color='lR',font=40,align='L',edge=30,code=backScene},
|
||||
}
|
||||
|
||||
return scene
|
||||
@@ -16,14 +16,14 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="system", x=750,y=280,color="Z",font=30,align="L",fText=SYSTEM},
|
||||
WIDGET.newText{name="version", x=950,y=280,color="Z",font=30,align="L",fText=VERSION.string},
|
||||
WIDGET.newButton{name="sprint", x=260,y=480,w=260,font=50,code=function()loadGame("sprint_40l",true)end},
|
||||
WIDGET.newButton{name="marathon",x=640,y=480,w=260,font=50,code=function()loadGame("marathon_n",true)end},
|
||||
WIDGET.newText{name="system", x=750,y=280,color='Z',font=30,align='L',fText=SYSTEM},
|
||||
WIDGET.newText{name="version", x=950,y=280,color='Z',font=30,align='L',fText=VERSION.string},
|
||||
WIDGET.newButton{name="sprint", x=260,y=480,w=260,font=50,code=function()loadGame('sprint_40l',true)end},
|
||||
WIDGET.newButton{name="marathon",x=640,y=480,w=260,font=50,code=function()loadGame('marathon_n',true)end},
|
||||
WIDGET.newButton{name="setting",x=1000,y=400,w=120,fText="...",font=50,code=goScene"setting_game"},
|
||||
WIDGET.newButton{name="lang", x=1000,y=560,w=120,fText="言/A",font=40,code=goScene"lang"},
|
||||
WIDGET.newButton{name="help", x=1160,y=400,w=120,fText="?",font=80,code=goScene"help"},
|
||||
WIDGET.newButton{name="quit", x=1160,y=560,w=120,fText="X",font=70,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end},
|
||||
WIDGET.newButton{name="quit", x=1160,y=560,w=120,fText="X",font=70,code=function()VOC.play('bye')SCN.swapTo('quit','slowFade')end},
|
||||
}
|
||||
|
||||
return scene
|
||||
@@ -1,7 +1,7 @@
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("cubes")
|
||||
BG.set('cubes')
|
||||
WIDGET.active.texts:setTexts(require("parts.language.manual_"..({"zh","zh","zh","en","en","en","en","en"})[SETTING.lang]))
|
||||
end
|
||||
|
||||
|
||||
@@ -31,11 +31,11 @@ local function toggleMod(M,back)
|
||||
remMod(M)
|
||||
end
|
||||
if M.unranked then
|
||||
SFX.play("move",.6)
|
||||
SFX.play("lock")
|
||||
SFX.play('move',.6)
|
||||
SFX.play('lock')
|
||||
else
|
||||
SFX.play("move")
|
||||
SFX.play("lock",.6)
|
||||
SFX.play('move')
|
||||
SFX.play('lock',.6)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -45,7 +45,7 @@ local selected--Mod selected
|
||||
|
||||
function scene.sceneInit()
|
||||
selected=false
|
||||
BG.set("tunnel")
|
||||
BG.set('tunnel')
|
||||
end
|
||||
|
||||
function scene.mouseMove(x,y)
|
||||
@@ -78,7 +78,7 @@ function scene.keyDown(key)
|
||||
while GAME.mod[1]do
|
||||
rem(GAME.mod).sel=0
|
||||
end
|
||||
SFX.play("hold")
|
||||
SFX.play('hold')
|
||||
end
|
||||
elseif #key==1 then
|
||||
for _,M in next,MODOPT do
|
||||
@@ -110,7 +110,7 @@ function scene.draw()
|
||||
setFont(40)
|
||||
gc.setLineWidth(5)
|
||||
for _,M in next,MODOPT do
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.translate(M.x,M.y)
|
||||
local t=M.time*.01--t range:0~0.1
|
||||
gc.scale(1+3*t)
|
||||
@@ -123,10 +123,10 @@ function scene.draw()
|
||||
end
|
||||
local color=M.color
|
||||
gc.setColor(color[1],color[2],color[3],5*t)
|
||||
gc.circle("fill",0,0,rad,side)
|
||||
gc.circle('fill',0,0,rad,side)
|
||||
|
||||
gc.setColor(color)
|
||||
gc.circle("line",0,0,rad,side)
|
||||
gc.circle('line',0,0,rad,side)
|
||||
gc.setColor(1,1,1)
|
||||
mStr(M.id,0,-28)
|
||||
if M.sel>0 and M.list then
|
||||
@@ -138,7 +138,7 @@ function scene.draw()
|
||||
|
||||
if M.list then
|
||||
gc.setColor(1,1,1,t*6)
|
||||
gc.arc("line","open",0,0,rad+6,0,(M.sel/#M.list)*6.2832)
|
||||
gc.arc('line','open',0,0,rad+6,0,(M.sel/#M.list)*6.2832)
|
||||
end
|
||||
gc.pop()
|
||||
end
|
||||
@@ -154,8 +154,8 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=80,y=50,font=70,align="L"},
|
||||
WIDGET.newText{name="unranked", x=1200,y=60,color="Y",font=50,align="R",hide=function()return scoreValid()end},
|
||||
WIDGET.newText{name="title", x=80,y=50,font=70,align='L'},
|
||||
WIDGET.newText{name="unranked", x=1200,y=60,color='Y',font=50,align='R',hide=function()return scoreValid()end},
|
||||
WIDGET.newButton{name="reset", x=1140,y=540,w=170,h=80,font=25,code=pressKey"tab"},
|
||||
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ function scene.mouseClick(x,y)
|
||||
mapCam.moving=true
|
||||
_=MODES[SEL]
|
||||
mapCam.sel=SEL
|
||||
SFX.play("click")
|
||||
SFX.play('click')
|
||||
else
|
||||
mapCam.sel=false
|
||||
end
|
||||
@@ -120,7 +120,7 @@ function scene.keyDown(key)
|
||||
loadGame(mapCam.sel)
|
||||
end
|
||||
elseif key=="f1"then
|
||||
SCN.go("mod")
|
||||
SCN.go('mod')
|
||||
elseif key=="escape"then
|
||||
if mapCam.sel then
|
||||
mapCam.sel=false
|
||||
@@ -166,7 +166,7 @@ function scene.update()
|
||||
end
|
||||
if SEL and mapCam.sel~=SEL then
|
||||
mapCam.sel=SEL
|
||||
SFX.play("click")
|
||||
SFX.play('click')
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -206,7 +206,7 @@ local function drawModeShape(M,S,drawType)
|
||||
end
|
||||
function scene.draw()
|
||||
local _
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.translate(640,360)
|
||||
gc.rotate((mapCam.zoomK^.6-1))
|
||||
gc.scale(mapCam.zoomK^.7)
|
||||
@@ -237,9 +237,9 @@ function scene.draw()
|
||||
|
||||
--Draw shapes on map
|
||||
gc.setColor(baseRankColor[rank])
|
||||
drawModeShape(M,S,"fill")
|
||||
drawModeShape(M,S,'fill')
|
||||
gc.setColor(1,1,sel==name and 0 or 1)
|
||||
drawModeShape(M,S,"line")
|
||||
drawModeShape(M,S,'line')
|
||||
|
||||
--Icon
|
||||
local icon=M.icon
|
||||
@@ -265,19 +265,19 @@ function scene.draw()
|
||||
if sel then
|
||||
local M=MODES[sel]
|
||||
gc.setColor(.5,.5,.5,.8)
|
||||
gc.rectangle("fill",920,0,360,720)--Info board
|
||||
gc.rectangle('fill',920,0,360,720)--Info board
|
||||
gc.setColor(M.color)
|
||||
setFont(40)mStr(text.modes[sel][1],1100,5)
|
||||
setFont(30)mStr(text.modes[sel][2],1100,50)
|
||||
gc.setColor(1,1,1)
|
||||
setFont(25)gc.printf(text.modes[sel][3],920,110,360,"center")
|
||||
setFont(25)gc.printf(text.modes[sel][3],920,110,360,'center')
|
||||
if M.slowMark then
|
||||
gc.draw(IMG.ctrlSpeedLimit,1230,50,nil,.4)
|
||||
end
|
||||
if M.score then
|
||||
mText(drawableText.highScore,1100,240)
|
||||
gc.setColor(.3,.3,.3,.7)
|
||||
gc.rectangle("fill",940,290,320,280)--Highscore board
|
||||
gc.rectangle('fill',940,290,320,280)--Highscore board
|
||||
local L=M.records
|
||||
gc.setColor(1,1,1)
|
||||
if L[1]then
|
||||
|
||||
@@ -35,22 +35,22 @@ function scene.keyDown(key)
|
||||
if key=="down"then
|
||||
if S<BGM.getCount()then
|
||||
selected=S+1
|
||||
SFX.play("move",.7)
|
||||
SFX.play('move',.7)
|
||||
end
|
||||
elseif key=="up"then
|
||||
if S>1 then
|
||||
selected=S-1
|
||||
SFX.play("move",.7)
|
||||
SFX.play('move',.7)
|
||||
end
|
||||
elseif key=="return"or key=="space"then
|
||||
if BGM.nowPlay~=bgmList[S]then
|
||||
BGM.play(bgmList[S])
|
||||
if SETTING.bgm>0 then SFX.play("click")end
|
||||
if SETTING.bgm>0 then SFX.play('click')end
|
||||
else
|
||||
BGM.stop()
|
||||
end
|
||||
elseif key=="tab"then
|
||||
SCN.swapTo("sound","none")
|
||||
SCN.swapTo('sound','none')
|
||||
elseif key=="escape"then
|
||||
SCN.back()
|
||||
end
|
||||
@@ -88,14 +88,14 @@ function scene.draw()
|
||||
gc.setLineWidth(4)
|
||||
gc.line(500,600,900,600)
|
||||
gc.setColor(1,1,1)
|
||||
gc.circle("fill",500+400*BGM.playing:tell()/BGM.playing:getDuration(),600,6)
|
||||
gc.circle('fill',500+400*BGM.playing:tell()/BGM.playing:getDuration(),600,6)
|
||||
end
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=30, y=30,font=80,align="L"},
|
||||
WIDGET.newText{name="arrow", x=270, y=360,font=45,align="L"},
|
||||
WIDGET.newText{name="now", x=700, y=500,font=50,align="R",hide=function()return not BGM.nowPlay end},
|
||||
WIDGET.newText{name="title", x=30, y=30,font=80,align='L'},
|
||||
WIDGET.newText{name="arrow", x=270, y=360,font=45,align='L'},
|
||||
WIDGET.newText{name="now", x=700, y=500,font=50,align='R',hide=function()return not BGM.nowPlay end},
|
||||
WIDGET.newSlider{name="bgm", x=760, y=80,w=400, font=35,disp=SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end},
|
||||
WIDGET.newButton{name="up", x=200, y=250,w=120, font=55,code=pressKey"up",hide=function()return selected==1 end},
|
||||
WIDGET.newButton{name="play", x=200, y=390,w=120, font=35,code=pressKey"space"},
|
||||
|
||||
@@ -26,7 +26,7 @@ function scene.sceneInit()
|
||||
end
|
||||
textBox:scroll(1)
|
||||
TASK.new(function()YIELD()WIDGET.sel=WIDGET.active.input end)
|
||||
BG.set("none")
|
||||
BG.set('none')
|
||||
end
|
||||
function scene.sceneBack()
|
||||
NET.quitChat()
|
||||
@@ -65,7 +65,7 @@ function scene.socketRead(mes)
|
||||
}
|
||||
remain=tonumber(args[3])
|
||||
elseif cmd=="T"then
|
||||
local _,text=pcall(data.decode,"string","base64",args[3])
|
||||
local _,text=pcall(data.decode,'string','base64',args[3])
|
||||
if not _ then text=args[3]end
|
||||
textBox:push{
|
||||
COLOR.Z,args[1],
|
||||
@@ -81,7 +81,7 @@ end
|
||||
function scene.draw()
|
||||
setFont(25)
|
||||
gc.setColor(1,1,1)
|
||||
gc.printf(text.chatRemain,800,10,400,"right")
|
||||
gc.printf(text.chatRemain,800,10,400,'right')
|
||||
gc.print(remain or"?",1205,10)
|
||||
end
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ function scene.keyDown(key)
|
||||
elseif key=="space"then
|
||||
NET.signal_ready(not PLY_NET[1].ready)
|
||||
elseif key=="s"then
|
||||
if not(PLY_NET[1].ready or NET.getlock("ready"))then
|
||||
SCN.go("setting_game")
|
||||
if not(PLY_NET[1].ready or NET.getlock('ready'))then
|
||||
SCN.go('setting_game')
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -140,7 +140,7 @@ function scene.socketRead(cmd,d)
|
||||
COLOR.dY,"#"..d.uid.." ",
|
||||
COLOR.Y,text.joinRoom,
|
||||
}
|
||||
SFX.play("click")
|
||||
SFX.play('click')
|
||||
elseif cmd=="Leave"then
|
||||
textBox:push{
|
||||
COLOR.lR,d.username,
|
||||
@@ -161,7 +161,7 @@ function scene.socketRead(cmd,d)
|
||||
end
|
||||
lastUpstreamTime=0
|
||||
upstreamProgress=1
|
||||
resetGameData("n",d.seed)
|
||||
resetGameData('n',d.seed)
|
||||
else
|
||||
LOG.print("Redundant [Go]",30,COLOR.G)
|
||||
end
|
||||
@@ -177,7 +177,7 @@ function scene.socketRead(cmd,d)
|
||||
if not winnerUID then return end
|
||||
for _,p in next,PLY_NET do
|
||||
if p.uid==winnerUID then
|
||||
TEXT.show(text.champion:gsub("$1",p.username),640,260,80,"zoomout",.26)
|
||||
TEXT.show(text.champion:gsub("$1",p.username),640,260,80,'zoomout',.26)
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -185,7 +185,7 @@ function scene.socketRead(cmd,d)
|
||||
if d.uid~=USER.uid and playing then
|
||||
for _,P in next,PLAYERS do
|
||||
if P.uid==d.uid then
|
||||
local res,stream=pcall(love.data.decode,"string","base64",d.stream)
|
||||
local res,stream=pcall(love.data.decode,'string','base64',d.stream)
|
||||
if res then
|
||||
DATA.pumpRecording(stream,P.stream)
|
||||
else
|
||||
@@ -246,9 +246,9 @@ function scene.draw()
|
||||
local p=PLY_NET[i]
|
||||
|
||||
--Rectangle
|
||||
gc.setColor(COLOR[p.ready and"G"or"white"])
|
||||
gc.setColor(COLOR[p.ready and'G'or'Z'])
|
||||
gc.setLineWidth(2)
|
||||
gc.rectangle("line",40,65+50*i,1000,46)
|
||||
gc.rectangle('line',40,65+50*i,1000,46)
|
||||
|
||||
--UID
|
||||
setFont(40)
|
||||
@@ -282,24 +282,24 @@ function scene.draw()
|
||||
end
|
||||
scene.widgetList={
|
||||
textBox,
|
||||
WIDGET.newKey{name="setting",fText=TEXTURE.setting,x=1200,y=160,w=90,h=90,code=pressKey"s",hide=function()return playing or PLY_NET[1].ready or NET.getlock("ready")end},
|
||||
WIDGET.newKey{name="ready",x=900,y=560,w=400,h=100,color="lB",font=40,code=pressKey"space",
|
||||
WIDGET.newKey{name="setting",fText=TEXTURE.setting,x=1200,y=160,w=90,h=90,code=pressKey"s",hide=function()return playing or PLY_NET[1].ready or NET.getlock('ready')end},
|
||||
WIDGET.newKey{name="ready",x=900,y=560,w=400,h=100,color='lB',font=40,code=pressKey"space",
|
||||
hide=function()
|
||||
return
|
||||
playing or
|
||||
NET.serverGaming or
|
||||
not textBox.hide or
|
||||
PLY_NET[1].ready or
|
||||
NET.getlock("ready")
|
||||
NET.getlock('ready')
|
||||
end},
|
||||
WIDGET.newKey{name="cancel",x=900,y=560,w=400,h=100,color="H",font=40,code=pressKey"space",
|
||||
WIDGET.newKey{name="cancel",x=900,y=560,w=400,h=100,color='H',font=40,code=pressKey"space",
|
||||
hide=function()
|
||||
return
|
||||
playing or
|
||||
NET.serverGaming or
|
||||
not textBox.hide or
|
||||
not PLY_NET[1].ready or
|
||||
NET.getlock("ready")
|
||||
NET.getlock('ready')
|
||||
end},
|
||||
WIDGET.newKey{name="hideChat",fText="...",x=380,y=35,w=60,font=35,code=pressKey"\\"},
|
||||
WIDGET.newKey{name="quit",fText="X",x=900,y=35,w=60,font=40,code=pressKey"escape"},
|
||||
|
||||
@@ -18,8 +18,8 @@ scene.widgetList={
|
||||
WIDGET.newKey{name="setting",fText=TEXTURE.setting,x=1200,y=160,w=90,h=90,code=goScene"setting_game"},
|
||||
WIDGET.newButton{name="ffa", x=640, y=200,w=350,h=120,font=40,code=function()NET.enterRoom("ffa")end},
|
||||
WIDGET.newButton{name="rooms", x=640, y=360,w=350,h=120,font=40,code=goScene"net_rooms"},
|
||||
WIDGET.newButton{name="chat", x=640, y=540,w=350,h=120,color="D",font=40,code=NULL},
|
||||
WIDGET.newButton{name="logout", x=880, y=40,w=180,h=60,color="dR",
|
||||
WIDGET.newButton{name="chat", x=640, y=540,w=350,h=120,color='D',font=40,code=NULL},
|
||||
WIDGET.newButton{name="logout", x=880, y=40,w=180,h=60,color='dR',
|
||||
code=function()
|
||||
if TIME()-lastLogoutTime<1 then
|
||||
if USER.uid then
|
||||
@@ -28,7 +28,7 @@ scene.widgetList={
|
||||
USER.uid=false
|
||||
USER.username=false
|
||||
USER.authToken=false
|
||||
FILE.save(USER,"conf/user","q")
|
||||
FILE.save(USER,"conf/user",'q')
|
||||
SCN.back()
|
||||
end
|
||||
else
|
||||
|
||||
@@ -31,21 +31,21 @@ function scene.keyDown(k)
|
||||
fetchRoom()
|
||||
end
|
||||
elseif k=="s"then
|
||||
SCN.go("setting_game")
|
||||
SCN.go('setting_game')
|
||||
elseif k=="m"or k=="n"then
|
||||
if TIME()-lastCreateRoomTime>6.26 then
|
||||
NET.createRoom(
|
||||
k=="m"and"classic"or
|
||||
tonumber(USER.uid)<100 and(
|
||||
kb.isDown("q")and"r49"or
|
||||
kb.isDown("w")and"r99"or
|
||||
kb.isDown("e")and"unlimited"
|
||||
kb.isDown"q"and"r49"or
|
||||
kb.isDown"w"and"r99"or
|
||||
kb.isDown"e"and"unlimited"
|
||||
)or"solo",
|
||||
(USERS.getUsername(USER.uid)or"???").."'s room"
|
||||
)
|
||||
lastCreateRoomTime=TIME()
|
||||
else
|
||||
LOG.print(text.createRoomTooFast,"warn")
|
||||
LOG.print(text.createRoomTooFast,'warn')
|
||||
end
|
||||
elseif k=="escape"then
|
||||
SCN.back()
|
||||
@@ -61,7 +61,7 @@ function scene.keyDown(k)
|
||||
scrollPos=max(selected-10,min(scrollPos,selected-1))
|
||||
end
|
||||
elseif k=="return"then
|
||||
if NET.getlock("fetchRoom")or not NET.roomList[selected]then return end
|
||||
if NET.getlock('fetchRoom')or not NET.roomList[selected]then return end
|
||||
if NET.roomList[selected].private then
|
||||
LOG.print("Can't enter private room now")
|
||||
return
|
||||
@@ -89,7 +89,7 @@ function scene.mouseClick(x,y)
|
||||
if NET.roomList[s]then
|
||||
if selected~=s then
|
||||
selected=s
|
||||
SFX.play("click",.4)
|
||||
SFX.play('click',.4)
|
||||
else
|
||||
scene.keyDown("return")
|
||||
end
|
||||
@@ -100,7 +100,7 @@ end
|
||||
scene.touchClick=scene.mouseClick
|
||||
|
||||
function scene.update(dt)
|
||||
if not NET.getlock("fetchRoom")then
|
||||
if not NET.getlock('fetchRoom')then
|
||||
fetchTimer=fetchTimer-dt
|
||||
if fetchTimer<=0 then
|
||||
fetchRoom()
|
||||
@@ -112,30 +112,30 @@ function scene.update(dt)
|
||||
end
|
||||
|
||||
local function roomListStencil()
|
||||
gc.rectangle("fill",50,110,1180,400)
|
||||
gc.rectangle('fill',50,110,1180,400)
|
||||
end
|
||||
function scene.draw()
|
||||
--Fetching timer
|
||||
gc.setColor(1,1,1,.12)
|
||||
gc.arc("fill","pie",300,620,60,-1.5708,-1.5708-1.2566*fetchTimer)
|
||||
gc.arc('fill','pie',300,620,60,-1.5708,-1.5708-1.2566*fetchTimer)
|
||||
|
||||
--Room list
|
||||
gc.setColor(1,1,1)
|
||||
gc.setLineWidth(2)
|
||||
gc.rectangle("line",50,110,1060,400)
|
||||
gc.rectangle('line',50,110,1060,400)
|
||||
local roomCount=#NET.roomList
|
||||
if roomCount>0 then
|
||||
setFont(35)
|
||||
gc.push("transform")
|
||||
gc.stencil(roomListStencil,"replace",1)
|
||||
gc.setStencilTest("equal",1)
|
||||
gc.push('transform')
|
||||
gc.stencil(roomListStencil,'replace',1)
|
||||
gc.setStencilTest('equal',1)
|
||||
gc.translate(0,scrollPos%1*-40)
|
||||
local pos=int(scrollPos)
|
||||
for i=1,math.min(11,roomCount-pos)do
|
||||
local R=NET.roomList[pos+i]
|
||||
if pos+i==selected then
|
||||
gc.setColor(1,1,1,.3)
|
||||
gc.rectangle("fill",50,70+40*i,1060,40)
|
||||
gc.rectangle('fill',50,70+40*i,1060,40)
|
||||
end
|
||||
if R.start then
|
||||
gc.setColor(0,1,0)
|
||||
@@ -146,7 +146,7 @@ function scene.draw()
|
||||
gc.setColor(1,1,.7)
|
||||
gc.print(R.name,250,66+40*i)
|
||||
gc.setColor(1,1,1)
|
||||
gc.printf(R.type,430,66+40*i,500,"right")
|
||||
gc.printf(R.type,430,66+40*i,500,'right')
|
||||
gc.print(R.count.."/"..R.capacity,980,66+40*i)
|
||||
if R.private then
|
||||
gc.draw(IMG.lock,59,75+40*i)
|
||||
@@ -156,7 +156,7 @@ function scene.draw()
|
||||
gc.pop()
|
||||
if roomCount>10 then
|
||||
local len=400*10/roomCount
|
||||
gc.rectangle("fill",1218,110+(400-len)*scrollPos/(roomCount-10),12,len)
|
||||
gc.rectangle('fill',1218,110+(400-len)*scrollPos/(roomCount-10),12,len)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -166,12 +166,12 @@ end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newKey{name="setting",fText=TEXTURE.setting,x=1200,y=160,w=90,h=90,code=pressKey"s"},
|
||||
WIDGET.newText{name="refreshing",x=580,y=255,font=45,hide=function()return not NET.getlock("fetchRoom")end},
|
||||
WIDGET.newText{name="noRoom", x=580,y=260,font=40,hide=function()return #NET.roomList>0 or NET.getlock("fetchRoom")end},
|
||||
WIDGET.newText{name="refreshing",x=580,y=255,font=45,hide=function()return not NET.getlock('fetchRoom')end},
|
||||
WIDGET.newText{name="noRoom", x=580,y=260,font=40,hide=function()return #NET.roomList>0 or NET.getlock('fetchRoom')end},
|
||||
WIDGET.newKey{name="refresh", x=300,y=620,w=140,h=140,font=35,code=fetchRoom,hide=function()return fetchTimer>3.26 end},
|
||||
WIDGET.newKey{name="new", x=500,y=620,w=140,h=140,font=20,code=pressKey"n"},
|
||||
WIDGET.newKey{name="new2", x=700,y=620,w=140,h=140,font=20,code=pressKey"m"},
|
||||
WIDGET.newKey{name="join", x=900,y=620,w=140,h=140,font=40,code=pressKey"return",hide=function()return #NET.roomList==0 or NET.getlock("enterRoom") end},
|
||||
WIDGET.newKey{name="join", x=900,y=620,w=140,h=140,font=40,code=pressKey"return",hide=function()return #NET.roomList==0 or NET.getlock('enterRoom') end},
|
||||
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ local trophyColor--Current trophy color
|
||||
|
||||
function scene.sceneInit(org)
|
||||
if org:find("setting")then
|
||||
TEXT.show(text.needRestart,640,440,50,"fly",.6)
|
||||
TEXT.show(text.needRestart,640,440,50,'fly',.6)
|
||||
end
|
||||
local P=PLAYERS[1]
|
||||
local S=P.stat
|
||||
@@ -38,7 +38,7 @@ function scene.sceneInit(org)
|
||||
|
||||
local frameLostRate=(S.frame/S.time/60-1)*100
|
||||
form={
|
||||
{COLOR.Z,STRING.time(S.time),COLOR[frameLostRate>10 and"R"or frameLostRate>3 and"Y"or"H"],(" (%.2f%%)"):format(frameLostRate)},
|
||||
{COLOR.Z,STRING.time(S.time),COLOR[frameLostRate>10 and'R'or frameLostRate>3 and'Y'or'H'],(" (%.2f%%)"):format(frameLostRate)},
|
||||
("%d/%d/%d"):format(S.key,S.rotate,S.hold),
|
||||
("%d %.2fPPS"):format(S.piece,S.piece/S.time),
|
||||
("%d(%d) %.2fLPM"):format(S.row,S.dig,S.row/S.time*60),
|
||||
@@ -90,7 +90,7 @@ function scene.sceneInit(org)
|
||||
val[2*i-1],val[2*i]=val[i]*standard[2*i-1],val[i]*standard[2*i]
|
||||
end
|
||||
|
||||
if P.result=="WIN"and P.stat.piece>4 then
|
||||
if P.result=='win'and P.stat.piece>4 then
|
||||
local acc=P.stat.finesseRate*.2/P.stat.piece
|
||||
rank=
|
||||
acc==1. and"Z"or
|
||||
@@ -130,17 +130,17 @@ function scene.keyDown(key)
|
||||
if key=="q"then
|
||||
SCN.back()
|
||||
elseif key=="escape"then
|
||||
SCN.swapTo(GAME.result and"game"or"depause","none")
|
||||
SCN.swapTo(GAME.result and"game"or"depause",'none')
|
||||
elseif key=="s"then
|
||||
GAME.prevBG=BG.cur
|
||||
SCN.go("setting_sound")
|
||||
SCN.go('setting_sound')
|
||||
elseif key=="r"then
|
||||
resetGameData()
|
||||
SCN.swapTo("game","none")
|
||||
SCN.swapTo('game','none')
|
||||
elseif key=="p"then
|
||||
if(GAME.result or GAME.replaying)and #PLAYERS==1 then
|
||||
resetGameData("r")
|
||||
SCN.swapTo("game","none")
|
||||
resetGameData('r')
|
||||
SCN.swapTo('game','none')
|
||||
end
|
||||
elseif key=="o"then
|
||||
if(GAME.result or GAME.replaying)and #PLAYERS==1 and not GAME.saved then
|
||||
@@ -174,9 +174,9 @@ function scene.draw()
|
||||
local _=T
|
||||
if GAME.result then _=_*.7 end
|
||||
gc.setColor(.15,.15,.15,_)
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.origin()
|
||||
gc.rectangle("fill",0,0,SCR.w,SCR.h)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
gc.pop()
|
||||
|
||||
--Pause Info
|
||||
@@ -201,7 +201,7 @@ function scene.draw()
|
||||
--Finesse rank & trophy
|
||||
if rank then
|
||||
gc.setColor(1,1,1,T*.2)
|
||||
gc.rectangle("fill",35,305,465,405)
|
||||
gc.rectangle('fill',35,305,465,405)
|
||||
|
||||
setFont(60)
|
||||
local c=fnsRankColor[rank]
|
||||
@@ -210,24 +210,24 @@ function scene.draw()
|
||||
if trophy then
|
||||
setFont(40)
|
||||
gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T*2-1)
|
||||
gc.printf(trophy,100-120*(1-T^.5),650,300,"right")
|
||||
gc.printf(trophy,100-120*(1-T^.5),650,300,'right')
|
||||
end
|
||||
|
||||
gc.setColor(1,1,1,T)
|
||||
gc.rectangle("line",35,305,465,405)
|
||||
gc.rectangle('line',35,305,465,405)
|
||||
gc.line(35,620,500,620)
|
||||
else
|
||||
gc.setColor(1,1,1,T*.2)
|
||||
gc.rectangle("fill",35,305,465,350)
|
||||
gc.rectangle('fill',35,305,465,350)
|
||||
gc.setColor(1,1,1,T)
|
||||
gc.rectangle("line",35,305,465,350)
|
||||
gc.rectangle('line',35,305,465,350)
|
||||
end
|
||||
|
||||
_=form
|
||||
setFont(25)
|
||||
for i=1,10 do
|
||||
gc.print(text.pauseStat[i],40,270+35*i)
|
||||
gc.printf(_[i],195,270+35*i,300,"right")
|
||||
gc.printf(_[i],195,270+35*i,300,'right')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -235,14 +235,14 @@ function scene.draw()
|
||||
if #GAME.mod>0 then
|
||||
if scoreValid()then
|
||||
gc.setColor(.7,.7,.7,T)
|
||||
gc.rectangle("line",775,560,490,140)
|
||||
gc.rectangle('line',775,560,490,140)
|
||||
gc.setColor(.7,.7,.7,T*.26)
|
||||
gc.rectangle("fill",775,560,490,140)
|
||||
gc.rectangle('fill',775,560,490,140)
|
||||
else
|
||||
gc.setColor(1,0,0,T)
|
||||
gc.rectangle("line",775,560,490,140)
|
||||
gc.rectangle('line',775,560,490,140)
|
||||
gc.setColor(1,0,0,T*.26)
|
||||
gc.rectangle("fill",775,560,490,140)
|
||||
gc.rectangle('fill',775,560,490,140)
|
||||
end
|
||||
setFont(35)
|
||||
for _,M in next,MODOPT do
|
||||
@@ -269,19 +269,19 @@ function scene.draw()
|
||||
if T>.5 and PLAYERS[1].frameRun>180 then
|
||||
T=T*2-1
|
||||
gc.setLineWidth(2)
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.translate(1026,370)
|
||||
|
||||
--Polygon
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.scale((3-2*T)*T)
|
||||
gc.setColor(1,1,1,T*(.5+.3*sin(TIME()*6.26)))gc.polygon("line",standard)
|
||||
gc.setColor(1,1,1,T*(.5+.3*sin(TIME()*6.26)))gc.polygon('line',standard)
|
||||
gc.setColor(chartColor[1],chartColor[2],chartColor[3],T*.626)
|
||||
for i=1,9,2 do
|
||||
gc.polygon("fill",0,0,val[i],val[i+1],val[i+2],val[i+3])
|
||||
gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3])
|
||||
end
|
||||
gc.polygon("fill",0,0,val[11],val[12],val[1],val[2])
|
||||
gc.setColor(1,1,1,T)gc.polygon("line",val)
|
||||
gc.polygon('fill',0,0,val[11],val[12],val[1],val[2])
|
||||
gc.setColor(1,1,1,T)gc.polygon('line',val)
|
||||
gc.pop()
|
||||
|
||||
--Axes
|
||||
@@ -311,11 +311,11 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="setting", x=1120,y=70,w=240,h=90, color="lB",font=35,code=pressKey"s"},
|
||||
WIDGET.newButton{name="replay", x=535,y=250,w=200,h=100,color="lY",font=30,code=pressKey"p",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end},
|
||||
WIDGET.newButton{name="save", x=745,y=250,w=200,h=100,color="G",font=30,code=pressKey"o",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end},
|
||||
WIDGET.newButton{name="resume", x=640,y=367,w=240,h=100,color="lG",font=30,code=pressKey"escape"},
|
||||
WIDGET.newButton{name="restart", x=640,y=483,w=240,h=100,color="lR",font=35,code=pressKey"r"},
|
||||
WIDGET.newButton{name="setting", x=1120,y=70,w=240,h=90, color='lB',font=35,code=pressKey"s"},
|
||||
WIDGET.newButton{name="replay", x=535,y=250,w=200,h=100,color='lY',font=30,code=pressKey"p",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end},
|
||||
WIDGET.newButton{name="save", x=745,y=250,w=200,h=100,color='G',font=30,code=pressKey"o",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end},
|
||||
WIDGET.newButton{name="resume", x=640,y=367,w=240,h=100,color='lG',font=30,code=pressKey"escape"},
|
||||
WIDGET.newButton{name="restart", x=640,y=483,w=240,h=100,color='lR',font=35,code=pressKey"r"},
|
||||
WIDGET.newButton{name="quit", x=640,y=600,w=240,h=100,font=35,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ local function register()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=80, y=50,font=70,align="L"},
|
||||
WIDGET.newButton{name="login", x=1140, y=100,w=170,h=80,color="lY",code=function()SCN.swapTo("login","swipeL")end},
|
||||
WIDGET.newText{name="title", x=80, y=50,font=70,align='L'},
|
||||
WIDGET.newButton{name="login", x=1140, y=100,w=170,h=80,color='lY',code=function()SCN.swapTo('login','swipeL')end},
|
||||
WIDGET.newInputBox{name="username", x=380, y=200,w=500,h=60,regex="[0-9A-Za-z_]"},
|
||||
WIDGET.newInputBox{name="email", x=380, y=300,w=626,h=60},
|
||||
WIDGET.newInputBox{name="password", x=380, y=400,w=626,h=60,secret=true,regex="[ -~]"},
|
||||
|
||||
@@ -3,9 +3,9 @@ local scene={}
|
||||
local function dumpCB(T)
|
||||
love.system.setClipboardText(
|
||||
love.data.encode(
|
||||
"string","base64",
|
||||
'string','base64',
|
||||
love.data.compress(
|
||||
"string","zlib",
|
||||
'string','zlib',
|
||||
TABLE.dump(T)
|
||||
)
|
||||
)
|
||||
@@ -17,9 +17,9 @@ local function parseCB()
|
||||
local s=love.system.getClipboardText()
|
||||
|
||||
--Decode
|
||||
_,s=pcall(love.data.decode,"string","base64",s)
|
||||
_,s=pcall(love.data.decode,'string','base64',s)
|
||||
if not _ then LOG.print(text.dataCorrupted,COLOR.R)return end
|
||||
_,s=pcall(love.data.decompress,"string","zlib",s)
|
||||
_,s=pcall(love.data.decompress,'string','zlib',s)
|
||||
if not _ then LOG.print(text.dataCorrupted,COLOR.R)return end
|
||||
|
||||
s=loadstring(s)
|
||||
@@ -29,53 +29,53 @@ local function parseCB()
|
||||
end
|
||||
end
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="exportUnlock", x=190,y=150,w=280,h=100,color="lG",font=25,code=function()dumpCB(RANKS)end},
|
||||
WIDGET.newButton{name="exportData", x=490,y=150,w=280,h=100,color="lG",font=25,code=function()dumpCB(STAT)end},
|
||||
WIDGET.newButton{name="exportSetting", x=790,y=150,w=280,h=100,color="lG",font=25,code=function()dumpCB(SETTING)end},
|
||||
WIDGET.newButton{name="exportVK", x=1090,y=150,w=280,h=100,color="lG",font=25,code=function()dumpCB(VK_org)end},
|
||||
WIDGET.newButton{name="exportUnlock", x=190,y=150,w=280,h=100,color='lG',font=25,code=function()dumpCB(RANKS)end},
|
||||
WIDGET.newButton{name="exportData", x=490,y=150,w=280,h=100,color='lG',font=25,code=function()dumpCB(STAT)end},
|
||||
WIDGET.newButton{name="exportSetting", x=790,y=150,w=280,h=100,color='lG',font=25,code=function()dumpCB(SETTING)end},
|
||||
WIDGET.newButton{name="exportVK", x=1090,y=150,w=280,h=100,color='lG',font=25,code=function()dumpCB(VK_org)end},
|
||||
|
||||
WIDGET.newButton{name="importUnlock", x=190,y=300,w=280,h=100,color="lB",font=25,
|
||||
WIDGET.newButton{name="importUnlock", x=190,y=300,w=280,h=100,color='lB',font=25,
|
||||
code=function()
|
||||
local D=parseCB()
|
||||
if D then
|
||||
TABLE.update(D,RANKS)
|
||||
FILE.save(RANKS,"conf/unlock")
|
||||
LOG.print(text.importSuccess,"message")
|
||||
LOG.print(text.importSuccess,'message')
|
||||
else
|
||||
LOG.print(text.dataCorrupted,"warn")
|
||||
LOG.print(text.dataCorrupted,'warn')
|
||||
end
|
||||
end},
|
||||
WIDGET.newButton{name="importData", x=490,y=300,w=280,h=100,color="lB",font=25,
|
||||
WIDGET.newButton{name="importData", x=490,y=300,w=280,h=100,color='lB',font=25,
|
||||
code=function()
|
||||
local D=parseCB()
|
||||
if D and D.version==STAT.version then
|
||||
TABLE.update(D,STAT)
|
||||
FILE.save(STAT,"conf/data")
|
||||
LOG.print(text.importSuccess,"message")
|
||||
LOG.print(text.importSuccess,'message')
|
||||
else
|
||||
LOG.print(text.dataCorrupted,"warn")
|
||||
LOG.print(text.dataCorrupted,'warn')
|
||||
end
|
||||
end},
|
||||
WIDGET.newButton{name="importSetting", x=790,y=300,w=280,h=100,color="lB",font=25,
|
||||
WIDGET.newButton{name="importSetting", x=790,y=300,w=280,h=100,color='lB',font=25,
|
||||
code=function()
|
||||
local D=parseCB()
|
||||
if D then
|
||||
TABLE.update(D,SETTING)
|
||||
FILE.save(SETTING,"conf/settings")
|
||||
LOG.print(text.importSuccess,"message")
|
||||
LOG.print(text.importSuccess,'message')
|
||||
else
|
||||
LOG.print(text.dataCorrupted,"warn")
|
||||
LOG.print(text.dataCorrupted,'warn')
|
||||
end
|
||||
end},
|
||||
WIDGET.newButton{name="importVK", x=1090,y=300,w=280,h=100,color="lB",font=25,
|
||||
WIDGET.newButton{name="importVK", x=1090,y=300,w=280,h=100,color='lB',font=25,
|
||||
code=function()
|
||||
local D=parseCB()
|
||||
if D then
|
||||
TABLE.update(D,VK_org)
|
||||
FILE.save(VK_org,"conf/virtualkey")
|
||||
LOG.print(text.importSuccess,"message")
|
||||
LOG.print(text.importSuccess,'message')
|
||||
else
|
||||
LOG.print(text.dataCorrupted,"warn")
|
||||
LOG.print(text.dataCorrupted,'warn')
|
||||
end
|
||||
end},
|
||||
WIDGET.newButton{name="back", x=640,y=620,w=200,h=80,font=40,code=backScene},
|
||||
|
||||
@@ -8,7 +8,7 @@ local pos,dir,wait
|
||||
function scene.sceneInit()
|
||||
das,arr=SETTING.das,SETTING.arr
|
||||
pos,dir,wait=0,1,30
|
||||
BG.set("bg1")
|
||||
BG.set('bg1')
|
||||
end
|
||||
|
||||
function scene.update()
|
||||
@@ -78,8 +78,8 @@ local function sliderShow(S)
|
||||
return S.."F "..math.floor(S*16.67).."ms"
|
||||
end
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=80, y=50,font=70,align="L"},
|
||||
WIDGET.newText{name="preview", x=520, y=540,font=40,align="R"},
|
||||
WIDGET.newText{name="title", x=80, y=50,font=70,align='L'},
|
||||
WIDGET.newText{name="preview", x=520, y=540,font=40,align='R'},
|
||||
|
||||
WIDGET.newSlider{name="das", x=250, y=190,w=600,unit=20,disp=SETval("das"), show=sliderShow,code=SETsto("das")},
|
||||
WIDGET.newSlider{name="arr", x=250, y=260,w=525,unit=15,disp=SETval("arr"), show=sliderShow,code=SETsto("arr")},
|
||||
@@ -89,7 +89,7 @@ scene.widgetList={
|
||||
WIDGET.newSwitch{name="ihs", x=1100, y=260, disp=SETval("ihs"), code=SETrev("ihs")},
|
||||
WIDGET.newSwitch{name="irs", x=1100, y=330, disp=SETval("irs"), code=SETrev("irs")},
|
||||
WIDGET.newSwitch{name="ims", x=1100, y=400, disp=SETval("ims"), code=SETrev("ims")},
|
||||
WIDGET.newButton{name="reset", x=160, y=580,w=200,h=100,color="lR",font=40,
|
||||
WIDGET.newButton{name="reset", x=160, y=580,w=200,h=100,color='lR',font=40,
|
||||
code=function()
|
||||
local _=SETTING
|
||||
_.das,_.arr,_.dascut=10,2,0
|
||||
|
||||
@@ -21,19 +21,19 @@ end
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=640,y=15,font=80},
|
||||
|
||||
WIDGET.newButton{name="graphic", x=200, y=80, w=240,h=80, color="lC",font=35,code=swapScene"setting_video","swipeR"},
|
||||
WIDGET.newButton{name="sound", x=1080, y=80, w=240,h=80, color="lC",font=35,code=swapScene"setting_sound","swipeL"},
|
||||
WIDGET.newButton{name="graphic", x=200, y=80, w=240,h=80, color='lC',font=35,code=swapScene"setting_video","swipeR"},
|
||||
WIDGET.newButton{name="sound", x=1080, y=80, w=240,h=80, color='lC',font=35,code=swapScene"setting_sound","swipeL"},
|
||||
|
||||
WIDGET.newButton{name="ctrl", x=290, y=220, w=320,h=80, color="lY",font=35,code=goScene"setting_control"},
|
||||
WIDGET.newButton{name="key", x=640, y=220, w=320,h=80, color="lG",font=35,code=goScene"setting_key"},
|
||||
WIDGET.newButton{name="touch", x=990, y=220, w=320,h=80, color="lB",font=35,code=goScene"setting_touch"},
|
||||
WIDGET.newButton{name="ctrl", x=290, y=220, w=320,h=80, color='lY',font=35,code=goScene"setting_control"},
|
||||
WIDGET.newButton{name="key", x=640, y=220, w=320,h=80, color='lG',font=35,code=goScene"setting_key"},
|
||||
WIDGET.newButton{name="touch", x=990, y=220, w=320,h=80, color='lB',font=35,code=goScene"setting_touch"},
|
||||
WIDGET.newSlider{name="reTime", x=350, y=340, w=300,unit=10,disp=SETval("reTime"),code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end},
|
||||
WIDGET.newSelector{name="RS", x=500, y=420, w=300,color="S",list={"TRS","SRS","C2","C2sym","Classic","None"},disp=SETval("RS"),code=SETsto("RS")},
|
||||
WIDGET.newSelector{name="RS", x=500, y=420, w=300,color='S',list={'TRS','SRS','C2','C2sym','Classic','None'},disp=SETval("RS"),code=SETsto("RS")},
|
||||
WIDGET.newButton{name="layout", x=250, y=540, w=200,h=70,font=35, code=goScene"setting_skin"},
|
||||
WIDGET.newSwitch{name="dataSaving", x=750, y=550, font=20,disp=SETval("dataSaving"), code=function()SETTING.dataSaving=not SETTING.dataSaving if not SETTING.dataSaving then USERS.forceFreshAvatar()end end},
|
||||
WIDGET.newSwitch{name="autoPause", x=1060, y=310, font=20,disp=SETval("autoPause"), code=SETrev("autoPause")},
|
||||
WIDGET.newSwitch{name="swap", x=1060, y=370, font=20,disp=SETval("swap"), code=SETrev("swap")},
|
||||
WIDGET.newSwitch{name="fine", x=1060, y=430, font=20,disp=SETval("fine"), code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play("finesseError",.6)end end},
|
||||
WIDGET.newSwitch{name="fine", x=1060, y=430, font=20,disp=SETval("fine"), code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play('finesseError',.6)end end},
|
||||
WIDGET.newSwitch{name="appLock", x=1060, y=490, font=20,disp=SETval("appLock"), code=SETrev("appLock")},
|
||||
WIDGET.newSwitch{name="simpMode", x=1060, y=550, font=25,disp=SETval("simpMode"),
|
||||
code=function()
|
||||
|
||||
@@ -20,7 +20,7 @@ end
|
||||
function scene.sceneInit()
|
||||
selected=false
|
||||
freshKeyList()
|
||||
BG.set("none")
|
||||
BG.set('none')
|
||||
end
|
||||
function scene.sceneBack()
|
||||
FILE.save(keyMap,"conf/key")
|
||||
@@ -36,7 +36,7 @@ function scene.keyDown(key)
|
||||
end
|
||||
freshKeyList()
|
||||
selected=false
|
||||
SFX.play("finesseError",.5)
|
||||
SFX.play('finesseError',.5)
|
||||
else
|
||||
SCN.back()
|
||||
end
|
||||
@@ -45,7 +45,7 @@ function scene.keyDown(key)
|
||||
keyMap.keyboard[key]=selected
|
||||
freshKeyList()
|
||||
selected=false
|
||||
SFX.play("reach",.5)
|
||||
SFX.play('reach',.5)
|
||||
end
|
||||
else
|
||||
WIDGET.keyPressed(key)
|
||||
@@ -61,7 +61,7 @@ function scene.gamepadDown(key)
|
||||
end
|
||||
freshKeyList()
|
||||
selected=false
|
||||
SFX.play("finesseError",.5)
|
||||
SFX.play('finesseError',.5)
|
||||
else
|
||||
SCN.back()
|
||||
end
|
||||
@@ -69,7 +69,7 @@ function scene.gamepadDown(key)
|
||||
keyMap.joystick[key]=selected
|
||||
freshKeyList()
|
||||
selected=false
|
||||
SFX.play("reach",.5)
|
||||
SFX.play('reach',.5)
|
||||
else
|
||||
WIDGET.gamepadPressed(key)
|
||||
end
|
||||
@@ -94,7 +94,7 @@ function scene.draw()
|
||||
end
|
||||
|
||||
if selected then
|
||||
gc.setColor(COLOR[TIME()%.26<.13 and"R"or"Y"])
|
||||
gc.setColor(COLOR[TIME()%.26<.13 and'R'or'Y'])
|
||||
local x,y=selected>10 and 910 or 270, selected>10 and 60*(selected-10)-50 or selected>0 and 60*selected-50 or 630
|
||||
setFont(40)gc.print("=",x,y)
|
||||
setFont(10)gc.print("esc?",x,y+40)
|
||||
@@ -104,10 +104,10 @@ end
|
||||
local function setSel(i)
|
||||
if selected==i then
|
||||
selected=false
|
||||
SFX.play("rotate",.5)
|
||||
SFX.play('rotate',.5)
|
||||
else
|
||||
selected=i
|
||||
SFX.play("lock",.5)
|
||||
SFX.play('lock',.5)
|
||||
end
|
||||
end
|
||||
scene.widgetList={
|
||||
|
||||
@@ -23,7 +23,7 @@ function scene.draw()
|
||||
gc.setColor(1,1,1)
|
||||
local texture=SKIN.curText
|
||||
for n=1,7 do
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.translate(-10+140*n,340)
|
||||
gc.rotate(minoRot[n]+sin(t*3-n*.5)*.08)
|
||||
local color=SETTING.skin[n]
|
||||
@@ -35,7 +35,7 @@ function scene.draw()
|
||||
gc.draw(texture[color],x+30*j,y-30*i)
|
||||
end
|
||||
end end
|
||||
gc.circle("fill",0,0,sin(t*10)+5)
|
||||
gc.circle('fill',0,0,sin(t*10)+5)
|
||||
gc.pop()
|
||||
end
|
||||
for i=1,5 do
|
||||
@@ -53,11 +53,11 @@ end
|
||||
local function nextDir(i)
|
||||
SETTING.face[i]=(SETTING.face[i]+1)%4
|
||||
minoRot0[i]=minoRot0[i]+1.5707963
|
||||
SFX.play("rotate")
|
||||
SFX.play('rotate')
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=80,y=50,font=70,align="L"},
|
||||
WIDGET.newText{name="title", x=80,y=50,font=70,align='L'},
|
||||
|
||||
WIDGET.newButton{name="prev", x=700,y=100,w=140,h=100,fText="←",font=50,code=function()SKIN.prevSet()end},
|
||||
WIDGET.newButton{name="next", x=860,y=100,w=140,h=100,fText="→",font=50,code=function()SKIN.nextSet()end},
|
||||
@@ -85,12 +85,12 @@ scene.widgetList={
|
||||
--WIDGET.newButton{name="spin6",x=825,y=540,w=90,h=65,code=function()nextDir(6)end},--Cannot rotate O
|
||||
WIDGET.newButton{name="spin7", x=970,y=540,w=90,h=65,code=function()nextDir(7)end},
|
||||
|
||||
WIDGET.newButton{name="skinR", x=200,y=640,w=220,h=80,color="lV",font=35,
|
||||
WIDGET.newButton{name="skinR", x=200,y=640,w=220,h=80,color='lV',font=35,
|
||||
code=function()
|
||||
SETTING.skin={1,7,11,3,14,4,9,1,7,2,6,10,2,13,5,9,15,10,11,3,10,2,16,8,4,10,13,2,8}
|
||||
SFX.play("rotate")
|
||||
SFX.play('rotate')
|
||||
end},
|
||||
WIDGET.newButton{name="faceR", x=480,y=640,w=220,h=80,color="lR",font=35,
|
||||
WIDGET.newButton{name="faceR", x=480,y=640,w=220,h=80,color='lR',font=35,
|
||||
code=function()
|
||||
for i=1,29 do
|
||||
SETTING.face[i]=0
|
||||
@@ -98,7 +98,7 @@ scene.widgetList={
|
||||
for i=1,7 do
|
||||
minoRot0[i]=(int(minoRot0[i]/6.2831853)+(minoRot0[i]%6.2831853>4 and 1 or 0))*6.2831853
|
||||
end
|
||||
SFX.play("hold")
|
||||
SFX.play('hold')
|
||||
end},
|
||||
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
@@ -57,17 +57,17 @@ end
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=640,y=15,font=80},
|
||||
|
||||
WIDGET.newButton{name="game", x=200, y=80,w=240,h=80,color="lC",font=35,code=swapScene"setting_game","swipeR"},
|
||||
WIDGET.newButton{name="graphic",x=1080, y=80,w=240,h=80,color="lC",font=35,code=swapScene"setting_video","swipeL"},
|
||||
WIDGET.newButton{name="game", x=200, y=80,w=240,h=80,color='lC',font=35,code=swapScene"setting_game","swipeR"},
|
||||
WIDGET.newButton{name="graphic",x=1080, y=80,w=240,h=80,color='lC',font=35,code=swapScene"setting_video","swipeL"},
|
||||
|
||||
WIDGET.newSlider{name="sfx", x=180, y=200,w=400, font=35,change=function()SFX.play("blip_1")end,disp=SETval("sfx"),code=SETsto("sfx")},
|
||||
WIDGET.newSlider{name="sfx", x=180, y=200,w=400, font=35,change=function()SFX.play('blip_1')end,disp=SETval("sfx"),code=SETsto("sfx")},
|
||||
WIDGET.newSlider{name="spawn", x=180, y=300,w=400, font=30,change=function()SFX.fplay("spawn_"..math.random(7),SETTING.sfx_spawn)end,disp=SETval("sfx_spawn"),code=SETsto("sfx_spawn")},
|
||||
WIDGET.newSlider{name="warn", x=180, y=400,w=400, font=30,change=function()SFX.fplay("warning",SETTING.sfx_warn)end,disp=SETval("sfx_warn"),code=SETsto("sfx_warn")},
|
||||
WIDGET.newSlider{name='warn', x=180, y=400,w=400, font=30,change=function()SFX.fplay("warning",SETTING.sfx_warn)end,disp=SETval("sfx_warn"),code=SETsto("sfx_warn")},
|
||||
WIDGET.newSlider{name="bgm", x=180, y=500,w=400, font=35,disp=SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end},
|
||||
WIDGET.newSlider{name="stereo", x=180, y=600,w=400, font=35,change=function()SFX.play("move",1,-1)SFX.play("lock",1,1)end,disp=SETval("stereo"),code=SETsto("stereo"),hide=function()return SETTING.sx==0 end},
|
||||
WIDGET.newSlider{name="stereo", x=180, y=600,w=400, font=35,change=function()SFX.play('move',1,-1)SFX.play('lock',1,1)end,disp=SETval("stereo"),code=SETsto("stereo"),hide=function()return SETTING.sx==0 end},
|
||||
WIDGET.newSlider{name="vib", x=750, y=200,w=400,unit=5, font=25,change=function()VIB(2)end,disp=SETval("vib"),code=SETsto("vib")},
|
||||
WIDGET.newSlider{name="voc", x=750, y=300,w=400, font=35,change=function()VOC.play("test")end,disp=SETval("voc"),code=SETsto("voc")},
|
||||
WIDGET.newSelector{name="cv", x=1100, y=380,w=200, list={"miya","naki"},disp=function()return cv end,code=function(i)cv=i end},
|
||||
WIDGET.newSlider{name="voc", x=750, y=300,w=400, font=35,change=function()VOC.play('test')end,disp=SETval("voc"),code=SETsto("voc")},
|
||||
WIDGET.newSelector{name="cv", x=1100, y=380,w=200, list={'miya','naki'},disp=function()return cv end,code=function(i)cv=i end},
|
||||
WIDGET.newButton{name="apply", x=1100, y=460,w=180,h=80, code=function()SETTING.cv=cv VOC.loadAll()end,hide=function()return SETTING.cv==cv end},
|
||||
WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80, font=40,code=backScene},
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ local snapUnit=1
|
||||
local selected--Button selected
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("rainbow")
|
||||
BG.set('rainbow')
|
||||
defaultSetSelect=1
|
||||
selected=false
|
||||
end
|
||||
@@ -62,8 +62,8 @@ end
|
||||
|
||||
function scene.draw()
|
||||
gc.setColor(1,1,1)
|
||||
gc.setLineWidth(7)gc.rectangle("line",340,15,600,690)
|
||||
gc.setLineWidth(3)gc.rectangle("line",490,85,300,600)
|
||||
gc.setLineWidth(7)gc.rectangle('line',340,15,600,690)
|
||||
gc.setLineWidth(3)gc.rectangle('line',490,85,300,600)
|
||||
VK.preview(selected)
|
||||
if snapUnit>=10 then
|
||||
gc.setLineWidth(3)
|
||||
@@ -170,10 +170,10 @@ scene.widgetList={
|
||||
defaultSetSelect=defaultSetSelect%5+1
|
||||
selected=false
|
||||
end},
|
||||
WIDGET.newSelector{name="snap", x=760,y=90,w=200,h=80,color="Y",list={1,10,20,40,60,80},disp=function()return snapUnit end,code=function(i)snapUnit=i end},
|
||||
WIDGET.newSelector{name="snap", x=760,y=90,w=200,h=80,color='Y',list={1,10,20,40,60,80},disp=function()return snapUnit end,code=function(i)snapUnit=i end},
|
||||
WIDGET.newButton{name="option", x=520,y=190,w=200,h=80,font=40,
|
||||
code=function()
|
||||
SCN.go("setting_touchSwitch")
|
||||
SCN.go('setting_touchSwitch')
|
||||
end},
|
||||
WIDGET.newButton{name="back", x=760,y=190,w=200,h=80,font=35,code=backScene},
|
||||
WIDGET.newSlider{name="size", x=450,y=270,w=460,unit=19,font=40,show="vkSize",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("matrix")
|
||||
BG.set('matrix')
|
||||
end
|
||||
|
||||
local function VKAdisp(n)return function()return VK_org[n].ava end end
|
||||
@@ -32,12 +32,12 @@ scene.widgetList={
|
||||
WIDGET.newButton{name="pro", x=1120, y=100, w=240,h=80, font=35,code=function()for i=1,20 do VK_org[i].ava=true end end},
|
||||
WIDGET.newSwitch{name="hide", x=1170, y=200, font=40,disp=SETval("VKSwitch"),code=SETrev("VKSwitch")},
|
||||
WIDGET.newSwitch{name="track", x=1170, y=300, font=35,disp=SETval("VKTrack"),code=SETrev("VKTrack")},
|
||||
WIDGET.newSlider{name="sfx", x=800, y=380, w=180, font=35,change=function()SFX.play("virtualKey",SETTING.VKSFX)end,disp=SETval("VKSFX"),code=SETsto("VKSFX")},
|
||||
WIDGET.newSlider{name="sfx", x=800, y=380, w=180, font=35,change=function()SFX.play('virtualKey',SETTING.VKSFX)end,disp=SETval("VKSFX"),code=SETsto("VKSFX")},
|
||||
WIDGET.newSlider{name="vib", x=800, y=460, w=180,unit=2,font=35,change=function()VIB(SETTING.VKVIB)end,disp=SETval("VKVIB"),code=SETsto("VKVIB")},
|
||||
WIDGET.newSwitch{name="icon", x=850, y=300, font=40,disp=SETval("VKIcon"),code=SETrev("VKIcon")},
|
||||
WIDGET.newButton{name="tkset", x=1120, y=420, w=240,h=80,
|
||||
code=function()
|
||||
SCN.go("setting_trackSetting")
|
||||
SCN.go('setting_trackSetting')
|
||||
end,
|
||||
hide=function()
|
||||
return not SETTING.VKTrack
|
||||
|
||||
@@ -10,8 +10,8 @@ end
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=640,y=15,font=80},
|
||||
|
||||
WIDGET.newButton{name="sound", x=200,y=80,w=240,h=80,color="lC",font=35,code=swapScene"setting_sound","swipeR"},
|
||||
WIDGET.newButton{name="game", x=1080,y=80,w=240,h=80,color="lC",font=35,code=swapScene"setting_game","swipeL"},
|
||||
WIDGET.newButton{name="sound", x=200,y=80,w=240,h=80,color='lC',font=35,code=swapScene"setting_sound","swipeR"},
|
||||
WIDGET.newButton{name="game", x=1080,y=80,w=240,h=80,color='lC',font=35,code=swapScene"setting_game","swipeL"},
|
||||
|
||||
WIDGET.newSwitch{name="block", x=290,y=165,disp=SETval("block"),code=SETrev("block")},
|
||||
WIDGET.newSwitch{name="smooth", x=290,y=215,disp=SETval("smooth"),code=SETrev("smooth")},
|
||||
@@ -39,7 +39,7 @@ scene.widgetList={
|
||||
|
||||
WIDGET.newSwitch{name="text", x=1140,y=160,font=35,disp=SETval("text"), code=SETrev("text")},
|
||||
WIDGET.newSwitch{name="score", x=1140,y=210,font=35,disp=SETval("score"), code=SETrev("score")},
|
||||
WIDGET.newSwitch{name="warn", x=1140,y=260,font=35,disp=SETval("warn"), code=SETrev("warn")},
|
||||
WIDGET.newSwitch{name='warn', x=1140,y=260,font=35,disp=SETval('warn'), code=SETrev('warn')},
|
||||
WIDGET.newSwitch{name="highCam", x=1140,y=310,font=35,disp=SETval("highCam"), code=SETrev("highCam")},
|
||||
WIDGET.newSwitch{name="nextPos", x=1140,y=360,font=35,disp=SETval("nextPos"), code=SETrev("nextPos")},
|
||||
WIDGET.newSwitch{name="fullscreen", x=1140,y=410,disp=SETval("fullscreen"), code=switchFullscreen},
|
||||
@@ -47,7 +47,7 @@ scene.widgetList={
|
||||
WIDGET.newSwitch{name="clickFX", x=1140,y=510,font=35,disp=SETval("clickFX"), code=SETrev("clickFX")},
|
||||
WIDGET.newSwitch{name="bg", x=1140,y=560,font=35,disp=SETval("bg"),
|
||||
code=function()
|
||||
BG.set("none")
|
||||
BG.set('none')
|
||||
SETTING.bg=not SETTING.bg
|
||||
BG.set()
|
||||
end},
|
||||
|
||||
@@ -19,48 +19,48 @@ function scene.keyDown(key)
|
||||
if b3b then b2b=false end
|
||||
elseif key=="4"then
|
||||
pc=not pc
|
||||
elseif type(key)=="number"then
|
||||
elseif type(key)=='number'then
|
||||
local CHN=VOC.getFreeChannel()
|
||||
if mini then VOC.play("mini",CHN)end
|
||||
if b2b then VOC.play("b2b",CHN)
|
||||
elseif b3b then VOC.play("b3b",CHN)
|
||||
if mini then VOC.play('mini',CHN)end
|
||||
if b2b then VOC.play('b2b',CHN)
|
||||
elseif b3b then VOC.play('b3b',CHN)
|
||||
end
|
||||
if key>=10 then
|
||||
VOC.play(blockName[math.floor(key/10)].."spin",CHN)
|
||||
end
|
||||
if lineCount[key%10]then VOC.play(lineCount[key%10],CHN)end
|
||||
if pc then VOC.play("perfect_clear",CHN)end
|
||||
if pc then VOC.play('perfect_clear',CHN)end
|
||||
elseif key=="tab"then
|
||||
SCN.swapTo("music","none")
|
||||
SCN.swapTo('music','none')
|
||||
elseif key=="escape"then
|
||||
SCN.back()
|
||||
end
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=30, y=15,font=70,align="L"},
|
||||
WIDGET.newSlider{name="sfx", x=510, y=60,w=330,font=35,change=function()SFX.play("blip_1")end,disp=SETval("sfx"),sound=false,code=SETsto("sfx")},
|
||||
WIDGET.newSlider{name="voc", x=510, y=120,w=330,font=35,change=function()VOC.play("test")end,disp=SETval("voc"),sound=false,code=SETsto("voc")},
|
||||
WIDGET.newText{name="title", x=30, y=15,font=70,align='L'},
|
||||
WIDGET.newSlider{name="sfx", x=510, y=60,w=330,font=35,change=function()SFX.play('blip_1')end,disp=SETval("sfx"),sound=false,code=SETsto("sfx")},
|
||||
WIDGET.newSlider{name="voc", x=510, y=120,w=330,font=35,change=function()VOC.play('test')end,disp=SETval("voc"),sound=false,code=SETsto("voc")},
|
||||
|
||||
WIDGET.newKey{name="move", x=110, y=140,w=160,h=50,font=20,sound=false,code=function()SFX.play("move")end},
|
||||
WIDGET.newKey{name="lock", x=110, y=205,w=160,h=50,font=20,sound=false,code=function()SFX.play("lock")end},
|
||||
WIDGET.newKey{name="drop", x=110, y=270,w=160,h=50,font=20,sound=false,code=function()SFX.play("drop")end},
|
||||
WIDGET.newKey{name="fall", x=110, y=335,w=160,h=50,font=20,sound=false,code=function()SFX.play("fall")end},
|
||||
WIDGET.newKey{name="rotate", x=110, y=400,w=160,h=50,font=20,sound=false,code=function()SFX.play("rotate")end},
|
||||
WIDGET.newKey{name="rotatekick",x=110, y=465,w=160,h=50,font=20,sound=false,code=function()SFX.play("rotatekick")end},
|
||||
WIDGET.newKey{name="hold", x=110, y=530,w=160,h=50,font=20,sound=false,code=function()SFX.play("hold")end},
|
||||
WIDGET.newKey{name="prerotate",x=110, y=595,w=160,h=50,font=20,sound=false,code=function()SFX.play("prerotate")end},
|
||||
WIDGET.newKey{name="prehold", x=110, y=660,w=160,h=50,font=20,sound=false,code=function()SFX.play("prehold")end},
|
||||
WIDGET.newKey{name="move", x=110, y=140,w=160,h=50,font=20,sound=false,code=function()SFX.play('move')end},
|
||||
WIDGET.newKey{name="lock", x=110, y=205,w=160,h=50,font=20,sound=false,code=function()SFX.play('lock')end},
|
||||
WIDGET.newKey{name="drop", x=110, y=270,w=160,h=50,font=20,sound=false,code=function()SFX.play('drop')end},
|
||||
WIDGET.newKey{name="fall", x=110, y=335,w=160,h=50,font=20,sound=false,code=function()SFX.play('fall')end},
|
||||
WIDGET.newKey{name="rotate", x=110, y=400,w=160,h=50,font=20,sound=false,code=function()SFX.play('rotate')end},
|
||||
WIDGET.newKey{name="rotatekick",x=110, y=465,w=160,h=50,font=20,sound=false,code=function()SFX.play('rotatekick')end},
|
||||
WIDGET.newKey{name="hold", x=110, y=530,w=160,h=50,font=20,sound=false,code=function()SFX.play('hold')end},
|
||||
WIDGET.newKey{name="prerotate",x=110, y=595,w=160,h=50,font=20,sound=false,code=function()SFX.play('prerotate')end},
|
||||
WIDGET.newKey{name="prehold", x=110, y=660,w=160,h=50,font=20,sound=false,code=function()SFX.play('prehold')end},
|
||||
|
||||
WIDGET.newKey{name="clear1", x=280, y=140,w=160,h=50,font=20,sound=false,code=function()SFX.play("clear_1")end},
|
||||
WIDGET.newKey{name="clear2", x=280, y=205,w=160,h=50,font=20,sound=false,code=function()SFX.play("clear_2")end},
|
||||
WIDGET.newKey{name="clear3", x=280, y=270,w=160,h=50,font=20,sound=false,code=function()SFX.play("clear_3")end},
|
||||
WIDGET.newKey{name="clear4", x=280, y=335,w=160,h=50,font=20,sound=false,code=function()SFX.play("clear_4")end},
|
||||
WIDGET.newKey{name="spin0", x=280, y=400,w=160,h=50,font=20,sound=false,code=function()SFX.play("spin_0")end},
|
||||
WIDGET.newKey{name="spin1", x=280, y=465,w=160,h=50,font=20,sound=false,code=function()SFX.play("spin_1")end},
|
||||
WIDGET.newKey{name="spin2", x=280, y=530,w=160,h=50,font=20,sound=false,code=function()SFX.play("spin_2")end},
|
||||
WIDGET.newKey{name="spin3", x=280, y=595,w=160,h=50,font=20,sound=false,code=function()SFX.play("spin_3")end},
|
||||
WIDGET.newKey{name="_pc", x=280, y=660,w=160,h=50,font=20,sound=false,code=function()SFX.play("clear")end},
|
||||
WIDGET.newKey{name="clear1", x=280, y=140,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear_1')end},
|
||||
WIDGET.newKey{name="clear2", x=280, y=205,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear_2')end},
|
||||
WIDGET.newKey{name="clear3", x=280, y=270,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear_3')end},
|
||||
WIDGET.newKey{name="clear4", x=280, y=335,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear_4')end},
|
||||
WIDGET.newKey{name="spin0", x=280, y=400,w=160,h=50,font=20,sound=false,code=function()SFX.play('spin_0')end},
|
||||
WIDGET.newKey{name="spin1", x=280, y=465,w=160,h=50,font=20,sound=false,code=function()SFX.play('spin_1')end},
|
||||
WIDGET.newKey{name="spin2", x=280, y=530,w=160,h=50,font=20,sound=false,code=function()SFX.play('spin_2')end},
|
||||
WIDGET.newKey{name="spin3", x=280, y=595,w=160,h=50,font=20,sound=false,code=function()SFX.play('spin_3')end},
|
||||
WIDGET.newKey{name="_pc", x=280, y=660,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear')end},
|
||||
|
||||
WIDGET.newKey{name="_1", x=970, y=75,w=140,h=50,font=20,sound=false,code=pressKey(1)},
|
||||
WIDGET.newKey{name="_2", x=1130, y=75,w=140,h=50,font=20,sound=false,code=pressKey(2)},
|
||||
|
||||
@@ -22,9 +22,9 @@ function scene.mouseDown(x,y)
|
||||
local T=40*math.min(time,45)
|
||||
if x>230 and x<1050 then
|
||||
if math.abs(y-800+T)<70 then
|
||||
loadGame("sprintLock",true)
|
||||
loadGame('sprintLock',true)
|
||||
elseif math.abs(y-2160+T)<70 then
|
||||
loadGame("sprintFix",true)
|
||||
loadGame('sprintFix',true)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -36,11 +36,11 @@ end
|
||||
function scene.keyDown(k)
|
||||
if k=="escape"then
|
||||
SCN.back()
|
||||
elseif kb.isDown("s")then
|
||||
elseif kb.isDown"s"then
|
||||
if k=="l"then
|
||||
loadGame("sprintLock",true)
|
||||
loadGame('sprintLock',true)
|
||||
elseif k=="f"then
|
||||
loadGame("sprintFix",true)
|
||||
loadGame('sprintFix',true)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -77,11 +77,11 @@ function scene.update(dt)
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
gc.push("transform")
|
||||
gc.push('transform')
|
||||
gc.origin()
|
||||
for i=1,#names do
|
||||
local N=names[i]
|
||||
if type(N.color)=="table"then
|
||||
if type(N.color)=='table'then
|
||||
gc.setColor(N.color)
|
||||
else
|
||||
gc.setColor(N.color(TIME()+N.w))
|
||||
|
||||
Reference in New Issue
Block a user