Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0dbdc9fe42 | ||
|
|
324435d51a | ||
|
|
1c384ca51a | ||
|
|
e196790e2c | ||
|
|
659a50300d |
BIN
VOICE/egg_1.ogg
Normal file
BIN
VOICE/egg_2.ogg
Normal file
95
class.lua
@@ -51,22 +51,39 @@ function button:FX()
|
||||
--[0=ripple],timer,duration,x,y,w,h
|
||||
end
|
||||
function button:draw()
|
||||
local C=self.color
|
||||
gc.setColor(C)
|
||||
gc.setLineWidth(3)gc.rectangle("line",self.x,self.y,self.w,self.h,4)
|
||||
gc.setColor(C[1],C[2],C[3],.4)
|
||||
gc.setLineWidth(5)gc.rectangle("line",self.x,self.y,self.w,self.h,4)
|
||||
local x,y,w,h=self.x,self.y,self.w,self.h
|
||||
local r,g,b=unpack(self.color)
|
||||
if self==widget_sel then
|
||||
gc.rectangle("fill",self.x,self.y,self.w,self.h,4)
|
||||
end--Highlight when Selected
|
||||
gc.setColor(r*.7,g*.7,b*.7)
|
||||
gc.rectangle("fill",x,y,w,h)
|
||||
x,y,w,h=x+w,y+h,-w,-h
|
||||
else
|
||||
gc.setColor(r*.9,g*.9,b*.9)
|
||||
gc.rectangle("fill",x,y,w,h)
|
||||
end
|
||||
gc.setLineWidth(3)
|
||||
gc.setColor(.4+r*.6,.4+g*.6,.4+b*.6)
|
||||
gc.line(x,y+h,x,y,x+w,y)
|
||||
gc.setColor(r*.6,g*.6,b*.6)
|
||||
gc.line(x,y+h,x+w,y+h,x+w,y)
|
||||
if self==widget_sel then
|
||||
x,y,w,h=x+w,y+h,-w,-h
|
||||
end
|
||||
local t=self.text
|
||||
if t then
|
||||
if type(t)=="function"then t=t()end
|
||||
setFont(self.font)
|
||||
local y0=self.y+self.h*.5-self.font*.7
|
||||
gc.printf(t,self.x-2,y0-1,self.w,"center")
|
||||
gc.setColor(C)
|
||||
gc.printf(t,self.x,y0,self.w,"center")
|
||||
local y0=y+h*.5-self.font*.7
|
||||
gc.setColor(1,1,1,.5)
|
||||
if self==widget_sel then
|
||||
gc.printf(t,x+2,y0+1,w,"center")
|
||||
gc.setColor(r*.5,g*.5,b*.5)
|
||||
gc.printf(t,x,y0,w,"center")
|
||||
else
|
||||
gc.printf(t,x,y0-1,w,"center")
|
||||
gc.setColor(r*.6,g*.6,b*.6)
|
||||
gc.printf(t,x-2,y0-2,w,"center")
|
||||
end
|
||||
end
|
||||
end
|
||||
function button:getInfo()
|
||||
@@ -84,27 +101,32 @@ function newSwitch(x,y,font,disp,code,hide,N)
|
||||
}for k,v in next,switch do _[k]=v end return _
|
||||
end
|
||||
function switch:isAbove(x,y)
|
||||
return x>self.x and x<self.x+100 and y>self.y-20 and y<self.y+20
|
||||
return x>self.x and x<self.x+50 and y>self.y-25 and y<self.y+25
|
||||
end
|
||||
function switch:FX()
|
||||
sysFX[#sysFX+1]=self.disp()and
|
||||
{1,0,15,1,.4,.4,self.x,self.y-20,50,40,0}--Switched on
|
||||
or{1,0,15,.4,1,.4,self.x+50,self.y-20,50,40,0}--Switched off
|
||||
{1,0,15,.4,1,.4,self.x,self.y-25,50,50,0}--Switched on
|
||||
or{1,0,15,1,.4,.4,self.x,self.y-25,50,50,0}--Switched off
|
||||
--[1=square fade],timer,duration,r,g,b,x,y,w,h
|
||||
end
|
||||
function switch:draw()
|
||||
local x,y=self.x,self.y-20
|
||||
local x,y=self.x,self.y-25
|
||||
if self.disp()then
|
||||
gc.setColor(.6,1,.6)
|
||||
gc.rectangle("fill",x+50,y,50,40,3)
|
||||
--ON
|
||||
gc.setColor(.9,1,.9)
|
||||
gc.setLineWidth(6)
|
||||
gc.line(x+5,y+25,x+18,y+38,x+45,y+11)
|
||||
end--checked
|
||||
if self==widget_sel then
|
||||
gc.setColor(1,1,1,.4)
|
||||
else
|
||||
gc.setColor(1,.6,.6)
|
||||
gc.rectangle("fill",x,y,50,40,3)
|
||||
--OFF
|
||||
end--switch
|
||||
gc.setColor(1,1,1,self==widget_sel and 1 or .6)
|
||||
gc.setLineWidth(3)gc.rectangle("line",x-3,y-3,106,46,5)
|
||||
gc.setColor(1,1,1,.2)
|
||||
end
|
||||
gc.rectangle("fill",x,y,50,50)
|
||||
gc.setLineWidth(3)
|
||||
gc.setColor(1,1,1)
|
||||
gc.line(x,y+50,x,y,x+50,y)
|
||||
gc.setColor(1,1,1,.7)
|
||||
gc.line(x,y+50,x+50,y+50,x+50,y)
|
||||
--frame
|
||||
local t=self.text
|
||||
if t then
|
||||
@@ -138,27 +160,34 @@ function slider:FX(pos)
|
||||
--[1=square fade],timer,duration,r,g,b,x,y,w,h
|
||||
end
|
||||
function slider:draw()
|
||||
local S=self==widget_sel
|
||||
gc.setColor(1,1,1,S and 1 or .5)
|
||||
local x,y=self.x,self.y
|
||||
gc.setColor(1,1,1,self==widget_sel and 1 or .5)
|
||||
gc.setLineWidth(2)
|
||||
local x1,x2=self.x,self.x+self.w
|
||||
local x1,x2=x,x+self.w
|
||||
for p=0,self.unit do
|
||||
local x=x1+(x2-x1)*p/self.unit
|
||||
gc.line(x,self.y+7,x,self.y-7)
|
||||
gc.line(x,y+7,x,y-7)
|
||||
end
|
||||
--units
|
||||
gc.setLineWidth(5)
|
||||
gc.line(x1,self.y,x2,self.y)
|
||||
gc.line(x1,y,x2,y)
|
||||
--axis
|
||||
gc.setColor(1,1,1)
|
||||
gc.rectangle("fill",x1+(x2-x1)*self.disp()/self.unit-8,self.y-15,17,30)
|
||||
--block
|
||||
local t=self.text
|
||||
if t then
|
||||
gc.setColor(1,1,1)
|
||||
setFont(self.font)
|
||||
gc.printf(t,self.x-312,self.y-self.font*.7,300,"right")
|
||||
gc.printf(t,x-312,y-self.font*.7,300,"right")
|
||||
end
|
||||
--text
|
||||
local x,y=x1+(x2-x1)*self.disp()/self.unit-8,y-15
|
||||
gc.setColor(.8,.8,.8)
|
||||
gc.rectangle("fill",x,y,17,30)
|
||||
gc.setLineWidth(2)
|
||||
gc.setColor(.5,.5,.5)
|
||||
gc.line(x,y+30,x+17,y+30,x+17,y)
|
||||
gc.setColor(1,1,1)
|
||||
gc.line(x,y+30,x,y,x+17,y)
|
||||
--block
|
||||
end
|
||||
function slider:getInfo()
|
||||
print(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))
|
||||
|
||||
2
conf.lua
@@ -1,5 +1,5 @@
|
||||
math.randomseed(os.time())
|
||||
gameVersion="Alpha V0.7.35"
|
||||
gameVersion="Alpha V0.8.2+"
|
||||
function love.conf(t)
|
||||
t.identity="Techmino"--Save directory name
|
||||
t.version="11.1"
|
||||
|
||||
195
dataList.lua
@@ -34,6 +34,7 @@ local pc_drop={50,45,40,35,30,26,22,18,15,12}
|
||||
local pc_lock={55,50,45,40,36,32,30}
|
||||
local pc_fall={18,16,14,12,10,9,8,7,6}
|
||||
local sectionName={"M7","M8","M9","M","MK","MV","MO","MM","GM"}
|
||||
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
|
||||
|
||||
local Fkey_func={
|
||||
royale=function(P)
|
||||
@@ -75,10 +76,10 @@ end
|
||||
Event={null=NULL}
|
||||
function Event.reach_winCheck(P)
|
||||
if P.stat.row>=P.gameEnv.target then
|
||||
Event.win(P)
|
||||
Event.win(P,"finish")
|
||||
end
|
||||
end
|
||||
function Event.win(P)
|
||||
function Event.win(P,result)
|
||||
P.alive=false
|
||||
P.control=false
|
||||
P.timing=false
|
||||
@@ -100,7 +101,7 @@ function Event.win(P)
|
||||
end
|
||||
end
|
||||
if P.human then
|
||||
gamefinished=true
|
||||
gameResult=result or"win"
|
||||
SFX("win")
|
||||
VOICE("win")
|
||||
if modeEnv.royaleMode then
|
||||
@@ -108,7 +109,11 @@ function Event.win(P)
|
||||
end
|
||||
end
|
||||
newTask(Event_task.finish,P)
|
||||
P:showText(text.win,"beat",90,nil,.4,curMode.id~="custom")
|
||||
if curMode.id=="custom"then
|
||||
P:showText(text.win,0,0,90,"beat",.4)
|
||||
else
|
||||
P:showText(text.win,0,0,90,"beat",.5,.2)
|
||||
end
|
||||
end
|
||||
function Event.lose(P)
|
||||
if P.invincible then
|
||||
@@ -139,7 +144,7 @@ function Event.lose(P)
|
||||
P:changeAtk()
|
||||
P.result="K.O."
|
||||
P.rank=#players.alive+1
|
||||
P:showText(P.rank,"appear",60,120,nil,true)
|
||||
P:showText(P.rank,0,-120,60,"appear",1,12)
|
||||
P.strength=0
|
||||
if P.lastRecv then
|
||||
local A,i=P,0
|
||||
@@ -185,9 +190,9 @@ function Event.lose(P)
|
||||
end
|
||||
end
|
||||
P.gameEnv.keepVisible=P.gameEnv.visible~="show"
|
||||
P:showText(text.lose,"appear",90,nil,nil,true)
|
||||
P:showText(text.lose,0,0,90,"appear",.5,.2)
|
||||
if P.human then
|
||||
gamefinished=true
|
||||
gameResult="lose"
|
||||
SFX("fail")
|
||||
VOICE("lose")
|
||||
if modeEnv.royaleMode then BGM("end")end
|
||||
@@ -249,7 +254,7 @@ function Event.master_score(P)
|
||||
P.modeData.point,P.modeData.event=500,4
|
||||
Event.win(P)
|
||||
else
|
||||
P:showText(text.stage(s),"fly",80,-120)
|
||||
P:showText(text.stage(s),0,-120,80,"fly")
|
||||
end
|
||||
SFX("reach")
|
||||
end
|
||||
@@ -270,7 +275,7 @@ function Event.master_score_hard(P)
|
||||
if P.modeData.point%100==99 then SFX("blip_1")end
|
||||
if int(P.modeData.point*.01)>P.modeData.event then
|
||||
local s=P.modeData.event+1;P.modeData.event=s--level up!
|
||||
P:showText(text.stage(s),"fly",80,-120)
|
||||
P:showText(text.stage(s),0,-120,80,"fly")
|
||||
if s<4 then--first 300
|
||||
if s~=1 then P.gameEnv.lock=P.gameEnv.lock-1 end
|
||||
if s~=2 then P.gameEnv.wait=P.gameEnv.wait-1 end
|
||||
@@ -414,9 +419,9 @@ function Event.newPC(P)
|
||||
P.gameEnv.lock=pc_lock[s]or 20
|
||||
P.gameEnv.fall=pc_fall[s]or 5
|
||||
if s==10 then
|
||||
P:showText(text.maxspeed,"appear",100,-140,.6)
|
||||
P:showText(text.maxspeed,0,-140,100,"appear",.6)
|
||||
else
|
||||
P:showText(text.speedup,"appear",40,-140)
|
||||
P:showText(text.speedup,0,-140,40,"appear",.8)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -447,6 +452,9 @@ end
|
||||
Event_task={}
|
||||
function Event_task.finish(P)
|
||||
P.endCounter=P.endCounter+1
|
||||
if scene.cur~="play"then
|
||||
return true
|
||||
end
|
||||
if P.endCounter>120 then
|
||||
pauseGame()
|
||||
return true
|
||||
@@ -462,12 +470,12 @@ function Event_task.lose(P)
|
||||
end
|
||||
end
|
||||
end
|
||||
if P.endCounter==100 then
|
||||
if P.endCounter==120 then
|
||||
while P.field[1]do
|
||||
removeRow(P.field)
|
||||
removeRow(P.visTime)
|
||||
end
|
||||
if #players==1 then
|
||||
if #players==1 and scene=="play"then
|
||||
pauseGame()
|
||||
end
|
||||
return true
|
||||
@@ -523,7 +531,7 @@ function Event_task.survivor_easy(P)
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=rnd(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+1
|
||||
P.stat.recv=P.stat.recv+1
|
||||
if P.modeData.event==45 then P:showText(text.maxspeed,"appear",100,-140,.6)end
|
||||
if P.modeData.event==45 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
@@ -540,7 +548,7 @@ function Event_task.survivor_normal(P)
|
||||
d%4==3 and{pos=rnd(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+d%4+1
|
||||
P.stat.recv=P.stat.recv+d%4+1
|
||||
if P.modeData.event==45 then P:showText(text.maxspeed,"appear",100,-140,.6)end
|
||||
if P.modeData.event==45 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.counter=0
|
||||
P.modeData.event=d
|
||||
end
|
||||
@@ -557,7 +565,7 @@ function Event_task.survivor_hard(P)
|
||||
local R=(P.modeData.event%3<2 and 1 or 3)
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+R
|
||||
P.stat.recv=P.stat.recv+R
|
||||
if P.modeData.event==60 then P:showText(text.maxspeed,"appear",100,-140,.6)end
|
||||
if P.modeData.event==60 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
@@ -570,7 +578,7 @@ function Event_task.survivor_lunatic(P)
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+4
|
||||
P.stat.recv=P.stat.recv+4
|
||||
if P.modeData.event==60 then P:showText(text.maxspeed,"appear",100,-140,.6)end
|
||||
if P.modeData.event==60 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.counter=0
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
@@ -588,7 +596,7 @@ function Event_task.survivor_ultimate(P)
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+20
|
||||
P.stat.recv=P.stat.recv+20
|
||||
P.counter=0
|
||||
if P.modeData.event==31 then P:showText(text.maxspeed,"appear",100,-140,.6)end
|
||||
if P.modeData.event==31 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
end
|
||||
@@ -608,16 +616,16 @@ function Event_task.defender_normal(P)
|
||||
D.event=D.event+1
|
||||
D.point=int(108e3/(360-D.event*2))*.1
|
||||
if D.event==25 then
|
||||
P:showText(text.great,"appear",100,-140,.6)
|
||||
P:showText(text.great,0,-140,100,"appear",.6)
|
||||
pushSpeed=2
|
||||
P.dropDelay,P.gameEnv.drop=20,20
|
||||
elseif D.event==50 then
|
||||
P:showText(text.awesome,"appear",100,-140,.6)
|
||||
P:showText(text.awesome,0,-140,100,"appear",.6)
|
||||
pushSpeed=3
|
||||
P.dropDelay,P.gameEnv.drop=10,10
|
||||
elseif D.event==90 then
|
||||
P.dropDelay,P.gameEnv.drop=5,5
|
||||
P:showText(text.maxspeed,"appear",100,-140,.6)
|
||||
P:showText(text.maxspeed,0,-140,100,"appear",.6)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -638,15 +646,15 @@ function Event_task.defender_lunatic(P)
|
||||
D.event=D.event+1
|
||||
D.point=int(144e3/(240-2*D.event))*.1
|
||||
if D.event==25 then
|
||||
P:showText(text.great,"appear",100,-140,.6)
|
||||
P:showText(text.great,0,-140,100,"appear",.6)
|
||||
pushSpeed=3
|
||||
P.dropDelay,P.gameEnv.drop=4,4
|
||||
elseif D.event==50 then
|
||||
P:showText(text.awesome,"appear",100,-140,.6)
|
||||
P:showText(text.awesome,0,-140,100,"appear",.6)
|
||||
pushSpeed=4
|
||||
P.dropDelay,P.gameEnv.drop=3,3
|
||||
elseif D.event==75 then
|
||||
P:showText(text.maxspeed,"appear",100,-140,.6)
|
||||
P:showText(text.maxspeed,0,-140,100,"appear",.6)
|
||||
P.dropDelay,P.gameEnv.drop=2,2
|
||||
end
|
||||
end
|
||||
@@ -673,10 +681,10 @@ function Event_task.attacker_hard(P)
|
||||
D.event=D.event+1
|
||||
D.point=int(72e4/t)*.1
|
||||
if D.event==20 then
|
||||
P:showText(text.great,"appear",100,-140,.6)
|
||||
P:showText(text.great,0,-140,100,"appear",.6)
|
||||
pushSpeed=3
|
||||
elseif D.event==50 then
|
||||
P:showText(text.maxspeed,"appear",100,-140,.6)
|
||||
P:showText(text.maxspeed,0,-140,100,"appear",.6)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -709,13 +717,13 @@ function Event_task.attacker_ultimate(P)
|
||||
D.event=D.event+1
|
||||
D.point=int(s*36e3/t)*.1
|
||||
if D.event==10 then
|
||||
P:showText(text.great,"appear",100,-140,.6)
|
||||
P:showText(text.great,0,-140,100,"appear",.6)
|
||||
pushSpeed=4
|
||||
elseif D.event==20 then
|
||||
P:showText(text.awesome,"appear",100,-140,.6)
|
||||
P:showText(text.awesome,0,-140,100,"appear",.6)
|
||||
pushSpeed=5
|
||||
elseif D.event==30 then
|
||||
P:showText(text.maxspeed,"appear",100,-140,.6)
|
||||
P:showText(text.maxspeed,0,-140,100,"appear",.6)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -791,14 +799,14 @@ modes.sprint={
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(55)
|
||||
local r=max(P.gameEnv.target-P.stat.row,0)
|
||||
mStr(r,-82,265)
|
||||
if r<21 and r>0 then
|
||||
gc.setLineWidth(4)
|
||||
gc.setColor(1,r>10 and 0 or rnd(),.5)
|
||||
gc.line(0,600-30*r,300,600-30*r)
|
||||
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
|
||||
end
|
||||
end,
|
||||
}
|
||||
@@ -824,8 +832,8 @@ modes.marathon={
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(50)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.stat.row,-82,320)
|
||||
mStr(P.gameEnv.target,-82,370)
|
||||
gc.rectangle("fill",-125,375,90,4)
|
||||
@@ -865,8 +873,8 @@ modes.master={
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(50)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.modeData.point,-82,320)
|
||||
mStr((P.modeData.event+1)*100,-82,370)
|
||||
gc.rectangle("fill",-125,375,90,4)
|
||||
@@ -889,12 +897,12 @@ modes.classic={
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(80)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(75)
|
||||
local r=P.gameEnv.target*.1
|
||||
mStr(r<11 and 18 or r<22 and r+8 or r==22 and"00"or r==23 and"0a"or format("%x",r*10-220),-82,210)
|
||||
mDraw(drawableText.speedLV,-82,290)
|
||||
setFont(50)
|
||||
setFont(45)
|
||||
mStr(P.stat.row,-82,320)
|
||||
mStr(P.gameEnv.target,-82,370)
|
||||
gc.rectangle("fill",-125,375,90,4)
|
||||
@@ -913,8 +921,8 @@ modes.zen={
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(70)
|
||||
mStr(max(200-P.stat.row,0),-82,280)
|
||||
end,
|
||||
}
|
||||
@@ -942,8 +950,8 @@ modes.infinite={
|
||||
end
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(50)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.stat.atk,-82,310)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),-82,420)
|
||||
mDraw(drawableText.atk,-82,363)
|
||||
@@ -983,7 +991,7 @@ modes.solo={
|
||||
newPlayer(2,965,360,.5,AITemplate("CC",10,4,true,80000))
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
mesDisp=function(P,dx,dy)
|
||||
|
||||
end,
|
||||
}
|
||||
@@ -1012,7 +1020,7 @@ modes.round={
|
||||
end
|
||||
garbageSpeed=1e4
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
mesDisp=function(P,dx,dy)
|
||||
|
||||
end,
|
||||
}
|
||||
@@ -1037,8 +1045,8 @@ modes.tsd={
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(80)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(75)
|
||||
mStr(P.modeData.event,-82,330)
|
||||
mDraw(drawableText.tsd,-82,407)
|
||||
end,
|
||||
@@ -1088,6 +1096,7 @@ modes.blind={
|
||||
_20G=true,
|
||||
drop=0,lock=15,
|
||||
wait=10,fall=15,
|
||||
next=3,
|
||||
visible="fast",
|
||||
freshLimit=15,
|
||||
dropPiece="GM_score",
|
||||
@@ -1101,15 +1110,15 @@ modes.blind={
|
||||
players[1].modeData.event="M7"
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
mesDisp=function(P,dx,dy)
|
||||
mDraw(drawableText.line,-82,300)
|
||||
mDraw(drawableText.techrash,-82,420)
|
||||
if curMode.lv==6 then
|
||||
mDraw(drawableText.grade,-82,170)
|
||||
setFont(60)
|
||||
setFont(55)
|
||||
mStr(P.modeData.event,-82,110)
|
||||
end
|
||||
setFont(80)
|
||||
setFont(75)
|
||||
mStr(P.stat.row,-82,220)
|
||||
mStr(P.stat.clear_4,-82,340)
|
||||
end,
|
||||
@@ -1135,8 +1144,8 @@ modes.dig={
|
||||
newPlayer(1,340,15)
|
||||
pushSpeed=1
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(70)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,-82,310)
|
||||
mDraw(drawableText.wave,-82,375)
|
||||
end,
|
||||
@@ -1184,8 +1193,8 @@ modes.survivor={
|
||||
newPlayer(1,340,15)
|
||||
pushSpeed=curMode.lv>2 and 2 or 1
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(70)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,-82,310)
|
||||
mDraw(drawableText.wave,-82,375)
|
||||
end,
|
||||
@@ -1216,8 +1225,8 @@ modes.defender={
|
||||
pushSpeed=2
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(55)
|
||||
mStr(P.modeData.event,-82,200)
|
||||
mStr(P.modeData.point,-82,320)
|
||||
mDraw(drawableText.wave,-82,260)
|
||||
@@ -1248,8 +1257,8 @@ modes.attacker={
|
||||
pushSpeed=2
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(60)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(55)
|
||||
mStr(P.modeData.event,-82,200)
|
||||
mStr(
|
||||
curMode.lv==1 and 24
|
||||
@@ -1317,8 +1326,8 @@ modes.tech={
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(50)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.stat.atk,-82,310)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),-82,420)
|
||||
mDraw(drawableText.atk,-82,363)
|
||||
@@ -1362,9 +1371,8 @@ modes.c4wtrain={
|
||||
elseif r==6 then F[1][7],F[1][6],F[1][5]=10,10,10
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(50)
|
||||
mStr(max(100-P.stat.row,0),-82,220)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.combo,-82,310)
|
||||
mStr(P.modeData.point,-82,400)
|
||||
mDraw(drawableText.combo,-82,358)
|
||||
@@ -1400,8 +1408,8 @@ modes.pctrain={
|
||||
newPlayer(1,340,15)
|
||||
Event.newPC(players[1])
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(80)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(75)
|
||||
mStr(P.stat.pc,-82,330)
|
||||
mDraw(drawableText.pc,-82,412)
|
||||
end,
|
||||
@@ -1436,11 +1444,11 @@ modes.pcchallenge={
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(50)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(max(100-P.stat.row,0),-82,250)
|
||||
|
||||
setFont(80)
|
||||
|
||||
setFont(75)
|
||||
mStr(P.stat.pc,-82,350)
|
||||
mDraw(drawableText.pc,-82,432)
|
||||
|
||||
@@ -1499,17 +1507,17 @@ modes.techmino49={
|
||||
n=n+1
|
||||
end end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(40)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(35)
|
||||
mStr(#players.alive.."/49",-82,175)
|
||||
mStr(P.ko,-70,215)
|
||||
gc.draw(drawableText.ko,-127,225)
|
||||
setFont(25)
|
||||
setFont(20)
|
||||
gc.setColor(1,.5,0,.6)
|
||||
gc.print(P.badge,-47,227)
|
||||
gc.setColor(1,1,1)
|
||||
setFont(30)
|
||||
gc.print(up0to4[P.strength],-132,290)
|
||||
setFont(25)
|
||||
gc.print(powerUp[P.strength],-132,290)
|
||||
for i=1,P.strength do
|
||||
gc.draw(badgeIcon,16*i-138,260)
|
||||
end
|
||||
@@ -1563,17 +1571,17 @@ modes.techmino99={
|
||||
n=n+1
|
||||
end end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(40)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(35)
|
||||
mStr(#players.alive.."/99",-82,175)
|
||||
mStr(P.ko,-70,215)
|
||||
gc.draw(drawableText.ko,-127,225)
|
||||
setFont(25)
|
||||
setFont(20)
|
||||
gc.setColor(1,.5,0,.6)
|
||||
gc.print(P.badge,-47,227)
|
||||
gc.setColor(1,1,1)
|
||||
setFont(30)
|
||||
gc.print(up0to4[P.strength],-132,290)
|
||||
setFont(25)
|
||||
gc.print(powerUp[P.strength],-132,290)
|
||||
for i=1,P.strength do
|
||||
gc.draw(badgeIcon,16*i-138,260)
|
||||
end
|
||||
@@ -1602,8 +1610,8 @@ modes.drought={
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(75)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(70)
|
||||
mStr(max(100-P.stat.row,0),-82,280)
|
||||
end,
|
||||
}
|
||||
@@ -1631,7 +1639,7 @@ modes.hotseat={
|
||||
newPlayer(4,955,160,.5)
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
mesDisp=function(P,dx,dy)
|
||||
|
||||
end,
|
||||
}
|
||||
@@ -1689,31 +1697,20 @@ modes.custom={
|
||||
modeEnv.bg=customRange.bg[customSel[12]]
|
||||
modeEnv.bgm=customRange.bgm[customSel[13]]
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(55)
|
||||
if P.gameEnv.puzzle or P.gameEnv.target>1e10 then
|
||||
setFont(60)
|
||||
mStr(P.stat.row,-82,225)
|
||||
mDraw(drawableText.line,-82,290)
|
||||
else
|
||||
setFont(60)
|
||||
mStr(max(P.gameEnv.target-P.stat.row,0),-82,240)
|
||||
end
|
||||
if P.gameEnv.puzzle and P.modeData.event==0 then
|
||||
gc.setLineWidth(3)
|
||||
local m=puzzleMark
|
||||
for y=1,preField.h do for x=1,10 do
|
||||
local B=preField[y][x]
|
||||
if B>7 then
|
||||
gc.setColor(blockColor[B])
|
||||
gc.rectangle("line",30*x-23,607-30*y,16,16)
|
||||
elseif B>0 then
|
||||
local c=blockColor[B]
|
||||
gc.setColor(c[1],c[2],c[3],.6)
|
||||
gc.rectangle("line",30*x-25,605-30*y,20,20)
|
||||
gc.rectangle("line",30*x-20,610-30*y,10,10)
|
||||
elseif B==-1 then
|
||||
gc.setColor(1,1,1,.4)
|
||||
gc.line(30*x-25,605-30*y,30*x-5,625-30*y)
|
||||
gc.line(30*x-25,625-30*y,30*x-5,605-30*y)
|
||||
local T=preField[y][x]
|
||||
if T~=0 then
|
||||
gc.draw(m[T],30*x-30+dx,600-30*y+dy)
|
||||
end
|
||||
end end
|
||||
end
|
||||
|
||||
@@ -8,10 +8,10 @@ setting={
|
||||
ghost=true,center=true,
|
||||
smo=true,grid=false,
|
||||
dropFX=3,
|
||||
shakeFX=1,
|
||||
shakeFX=2,
|
||||
atkFX=3,
|
||||
frameMul=100,
|
||||
--
|
||||
|
||||
fullscreen=false,
|
||||
bg=true,
|
||||
bgblock=true,
|
||||
|
||||
|
Before Width: | Height: | Size: 140 B |
|
Before Width: | Height: | Size: 147 B After Width: | Height: | Size: 155 B |
BIN
image/miya/ch.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
image/miya/f1.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
image/miya/f2.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
image/miya/f3.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
image/miya/f4.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
@@ -9,6 +9,7 @@ local actName={
|
||||
"落在最左:","落在最右:","列在最左:","列在最右:",
|
||||
}
|
||||
return{
|
||||
lang="中文",
|
||||
atkModeName={"随机","徽章","击杀","反击"},
|
||||
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
|
||||
cmb={nil,nil,"3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!","15 Combo!","16 Combo!","17 Combo!","18 Combo!","19 Combo!","MEGACMB"},
|
||||
@@ -31,9 +32,9 @@ return{
|
||||
speedup="速度加快",
|
||||
|
||||
win="胜利",
|
||||
finish="结束",
|
||||
lose="失败",
|
||||
pause="暂停",
|
||||
finish="结束",
|
||||
pauseCount="暂停统计",
|
||||
|
||||
custom="自定义游戏",
|
||||
@@ -112,7 +113,7 @@ return{
|
||||
hotseat="友尽模式",
|
||||
},
|
||||
|
||||
load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",},
|
||||
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing",},
|
||||
tips={
|
||||
"不是动画,真的在加载!",
|
||||
"大满贯10连击消四全清!",
|
||||
@@ -194,7 +195,7 @@ return{
|
||||
warning="禁 止 私 自 传 播",
|
||||
WidgetText={
|
||||
main={
|
||||
lang="文-Lang",
|
||||
lang="Lang",
|
||||
qplay="快速开始",
|
||||
play="开始",
|
||||
setting="设置",
|
||||
@@ -306,16 +307,11 @@ return{
|
||||
back=BK,
|
||||
},
|
||||
setting_touch={
|
||||
hide="显示虚拟按键",
|
||||
track="按键自动跟踪",
|
||||
tkset="跟踪设置",
|
||||
default="默认组合",
|
||||
snap=function()return text.snapLevelName[snapLevel]end,
|
||||
alpha=function()return setting.VKAlpha.."0%"end,
|
||||
icon="图标",
|
||||
size="大小",
|
||||
toggle="开关",
|
||||
more="更多",
|
||||
back=BK,
|
||||
size="大小",
|
||||
},
|
||||
setting_touchSwitch={
|
||||
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
|
||||
@@ -325,6 +321,11 @@ return{
|
||||
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
|
||||
norm="标准",
|
||||
pro="专业",
|
||||
hide="显示虚拟按键",
|
||||
track="按键自动跟踪",
|
||||
icon="图标",
|
||||
tkset="跟踪设置",
|
||||
alpha="透明度",
|
||||
back=BK,
|
||||
},
|
||||
setting_trackSetting={
|
||||
|
||||
@@ -9,6 +9,7 @@ local actName={
|
||||
"落在最左:","落在最右:","列在最左:","列在最右:",
|
||||
}
|
||||
return{
|
||||
lang="全中文",
|
||||
atkModeName={"随机","徽章","击杀","反击"},
|
||||
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
|
||||
cmb={nil,nil,"3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!","15 Combo!","16 Combo!","17 Combo!","18 Combo!","19 Combo!","MEGACMB"},
|
||||
@@ -31,9 +32,9 @@ return{
|
||||
speedup="速度加快",
|
||||
|
||||
win="胜利",
|
||||
finish="结束",
|
||||
lose="失败",
|
||||
pause="暂停",
|
||||
finish="结束",
|
||||
pauseCount="暂停统计",
|
||||
|
||||
custom="自定义游戏",
|
||||
@@ -112,7 +113,7 @@ return{
|
||||
hotseat="友尽模式",
|
||||
},
|
||||
|
||||
load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",},
|
||||
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing",},
|
||||
tips={
|
||||
"不是动画,真的在加载!",
|
||||
"大满贯10连击消四全清!",
|
||||
@@ -194,7 +195,7 @@ return{
|
||||
warning="禁 止 私 自 传 播",
|
||||
WidgetText={
|
||||
main={
|
||||
lang="全-Lang",
|
||||
lang="Lang",
|
||||
qplay="快速开始",
|
||||
play="开始",
|
||||
setting="设置",
|
||||
@@ -307,16 +308,11 @@ return{
|
||||
back=BK,
|
||||
},
|
||||
setting_touch={
|
||||
hide="显示虚拟按键",
|
||||
track="按键自动跟踪",
|
||||
tkset="跟踪设置",
|
||||
default="默认组合",
|
||||
snap=function()return text.snapLevelName[snapLevel]end,
|
||||
alpha=function()return setting.VKAlpha.."0%"end,
|
||||
icon="图标",
|
||||
size="大小",
|
||||
toggle="开关",
|
||||
more="更多",
|
||||
back=BK,
|
||||
size="大小",
|
||||
},
|
||||
setting_touchSwitch={
|
||||
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
|
||||
@@ -326,6 +322,11 @@ return{
|
||||
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
|
||||
norm="标准",
|
||||
pro="专业",
|
||||
hide="显示虚拟按键",
|
||||
track="按键自动跟踪",
|
||||
icon="图标",
|
||||
tkset="跟踪设置",
|
||||
alpha="透明度",
|
||||
back=BK,
|
||||
},
|
||||
setting_trackSetting={
|
||||
@@ -347,4 +348,4 @@ return{
|
||||
back=BK,
|
||||
},
|
||||
},
|
||||
}
|
||||
}--译
|
||||
@@ -7,6 +7,7 @@ local actName={
|
||||
"Left Drop:","Right Drop:","Left INS:","Right INS:",
|
||||
}
|
||||
return{
|
||||
lang="English",
|
||||
atkModeName={"Random","Badges","K.O.s","Counters"},
|
||||
royale_remain=function(n)return n.." Players Remain"end,
|
||||
cmb={nil,nil,"3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!","15 Combo!","16 Combo!","17 Combo!","18 Combo!","19 Combo!","MEGACMB"},
|
||||
@@ -29,9 +30,9 @@ return{
|
||||
speedup="Speed up",
|
||||
|
||||
win="WIN",
|
||||
finish="FINISH",
|
||||
lose="LOSE",
|
||||
pause="PAUSE",
|
||||
finish="FINISH",
|
||||
pauseCount="Pause Count",
|
||||
|
||||
custom="Custom Game",
|
||||
@@ -110,7 +111,7 @@ return{
|
||||
hotseat="",
|
||||
},
|
||||
|
||||
load={"Loading VOICE","Loading BGM","Loading SFX","Finished",},
|
||||
load={[0]="Finished","Loading VOICE","Loading BGM","Loading SFX",},
|
||||
tips={
|
||||
"Not animation,real loading!",
|
||||
"Back to Back 10 combo Techrash PC!",
|
||||
@@ -193,7 +194,7 @@ Lib used:
|
||||
warning="DO NOT DISTRIBUTE",
|
||||
WidgetText={
|
||||
main={
|
||||
lang="文-Lang",
|
||||
lang="Lang",
|
||||
qplay="Qplay",
|
||||
play="Play",
|
||||
setting="Settings",
|
||||
@@ -305,16 +306,11 @@ Lib used:
|
||||
back=BK,
|
||||
},
|
||||
setting_touch={
|
||||
hide="Show Virtual Key",
|
||||
track="Auto track",
|
||||
tkset="Track setting",
|
||||
default="Defaults",
|
||||
snap=function()return text.snapLevelName[snapLevel]end,
|
||||
alpha=function()return setting.VKAlpha.."0%"end,
|
||||
icon="Icon",
|
||||
size="Size",
|
||||
toggle="Toggle",
|
||||
more="More",
|
||||
back=BK,
|
||||
size="Size",
|
||||
},
|
||||
setting_touchSwitch={
|
||||
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
|
||||
@@ -324,6 +320,11 @@ Lib used:
|
||||
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
|
||||
norm="Normal",
|
||||
pro="Professioanl",
|
||||
hide="Show Virtual Key",
|
||||
track="Auto track",
|
||||
icon="Icon",
|
||||
tkset="Track setting",
|
||||
alpha="Alpha",
|
||||
back=BK,
|
||||
},
|
||||
setting_trackSetting={
|
||||
|
||||
306
list.lua
@@ -97,6 +97,7 @@ voiceName={
|
||||
"win","lose",
|
||||
"bye",
|
||||
"nya","voc_nya",
|
||||
"egg",
|
||||
}
|
||||
voiceList={
|
||||
zspin={"zspin_1","zspin_2","zspin_3"},
|
||||
@@ -121,6 +122,7 @@ voiceList={
|
||||
bye={"bye_1","bye_2"},
|
||||
nya={"nya_1","nya_2","nya_3","nya_4"},
|
||||
voc_nya={"nya_11","nya_12","nya_13","nya_21","nya_22"},
|
||||
egg={"egg_1","egg_2"},
|
||||
}
|
||||
|
||||
musicID={
|
||||
@@ -168,7 +170,6 @@ customRange={
|
||||
|
||||
RCPB={10,33,200,33,105,5,105,60}
|
||||
snapLevelValue={1,10,20,40,60,80}
|
||||
up0to4={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
|
||||
modeID={
|
||||
[0]="custom",
|
||||
"sprint","marathon","master","classic","zen","infinite","solo","round","tsd","blind",
|
||||
@@ -212,7 +213,6 @@ local virtualkeySet={
|
||||
{8, 320, 720-200, 80},--hold
|
||||
{9, 80, 280, 80},--func
|
||||
{10,1280-80, 280, 80},--restart
|
||||
|
||||
},--Mirrored farter's set,sknaht
|
||||
{
|
||||
{1, 80, 720-80, 80},--moveLeft
|
||||
@@ -311,93 +311,104 @@ local function VKAcode(n)
|
||||
end
|
||||
end
|
||||
local C=color
|
||||
local skinName={
|
||||
"Normal(MrZ)",
|
||||
"Jelly(Miya)",
|
||||
"Plastic(MrZ)",
|
||||
"Glow(MrZ)",
|
||||
"Pure(MrZ)",
|
||||
"Text Bone(MrZ)",
|
||||
"Colored Bone(MrZ)",
|
||||
"white Bone(MrZ)",
|
||||
}
|
||||
-- T1,T2=0,0
|
||||
Widget={
|
||||
load={},intro={},quit={},
|
||||
main={
|
||||
play= newButton(150,280,200,160,C.red, 60,function()scene.push()scene.swapTo("mode")end, nil,"setting"),
|
||||
setting=newButton(370,280,200,160,C.lightBlue, 50,function()scene.push()scene.swapTo("setting_game")end, nil,"music"),
|
||||
music= newButton(590,280,200,160,C.lightPurple,37,function()scene.push()scene.swapTo("music")end, nil,"help"),
|
||||
help= newButton(150,460,200,160,C.yellow, 55,function()scene.push()scene.swapTo("help")end, nil,"stat"),
|
||||
stat= newButton(370,460,200,160,C.cyan, 48,function()scene.push()scene.swapTo("stat")end, nil,"qplay"),
|
||||
qplay= newButton(540,415,100,70,C.lightGreen, 28,function()scene.push()loadGame(modeSel,levelSel)end, nil,"lang"),
|
||||
lang= newButton(590,505,200,70,C.lightRed, 50,function()
|
||||
play= newButton(150,280,200,160,C.lightRed, 55,function()scene.push()scene.swapTo("mode")end, nil,"setting"),
|
||||
setting=newButton(370,280,200,160,C.lightBlue, 45,function()scene.push()scene.swapTo("setting_game")end, nil,"music"),
|
||||
music= newButton(590,280,200,160,C.lightPurple,32,function()scene.push()scene.swapTo("music")end, nil,"help"),
|
||||
help= newButton(150,460,200,160,C.lightYellow, 50,function()scene.push()scene.swapTo("help")end, nil,"stat"),
|
||||
stat= newButton(370,460,200,160,C.lightCyan, 43,function()scene.push()scene.swapTo("stat")end, nil,"qplay"),
|
||||
qplay= newButton(540,415,100,70,C.lightOrange, 23,function()scene.push()loadGame(modeSel,levelSel)end, nil,"lang"),
|
||||
lang= newButton(590,505,200,70,C.lightRed, 45,function()
|
||||
setting.lang=setting.lang%#langName+1
|
||||
swapLanguage(setting.lang)
|
||||
TEXT(text.lang,795,500,50,"appear",1.6)
|
||||
end,nil,"quit"),
|
||||
-- S1= newSlider(520,550,380,10,10,nil,function()return T1 end,function(i)T1=i end),
|
||||
-- S2= newSlider(520,590,380,10,10,nil,function()return T2 end,function(i)T2=i end),
|
||||
quit= newButton(370,620,280,100,C.lightGrey, 60,function()VOICE("bye")scene.swapTo("quit","slowFade")end,nil,"play"),
|
||||
quit= newButton(370,620,280,100,C.lightGrey, 55,function()VOICE("bye")scene.swapTo("quit","slowFade")end,nil,"play"),
|
||||
},
|
||||
mode={
|
||||
up= newButton(1000, 210,200,140,C.white, 80,pressKey("up"), function()return modeSel==1 end),
|
||||
down= newButton(1000, 430,200,140,C.white, 80,pressKey("down"), function()return modeSel==#modeID end),
|
||||
left= newButton(190, 160,100,80, C.white, 40,pressKey("left"), function()return levelSel==1 end),
|
||||
right= newButton(350, 160,100,80, C.white, 40,pressKey("right"), function()return levelSel==#modes[modeID[modeSel]].level end),
|
||||
start= newButton(1000, 600,250,100,C.green, 50,function()scene.push()loadGame(modeSel,levelSel)end),
|
||||
custom= newButton(275, 420,200,90, C.yellow, 40,function()scene.push()scene.swapTo("custom")end),
|
||||
back= newButton(640, 630,230,90, C.white, 45,scene.back),
|
||||
up= newButton(1000, 210,200,140,C.white, 75,pressKey("up"), function()return modeSel==1 end),
|
||||
down= newButton(1000, 430,200,140,C.white, 75,pressKey("down"), function()return modeSel==#modeID end),
|
||||
left= newButton(190, 150,100,80, C.white, 35,pressKey("left"), function()return levelSel==1 end),
|
||||
right= newButton(350, 150,100,80, C.white, 35,pressKey("right"), function()return levelSel==#modes[modeID[modeSel]].level end),
|
||||
start= newButton(1000, 600,250,100,C.lightGreen, 45,function()scene.push()loadGame(modeSel,levelSel)end),
|
||||
custom= newButton(275, 460,200,90, C.lightYellow, 35,function()scene.push()scene.swapTo("custom")end),
|
||||
back= newButton(640, 630,230,90, C.white, 40,scene.back),
|
||||
},
|
||||
music={
|
||||
bgm= newSlider(760, 80,400,10,40,nil,SETdisp("bgm"),function(i)setting.bgm=i;BGM(bgmPlaying)end),
|
||||
up= newButton(1100, 200,120,120,C.white,60,pressKey("up")),
|
||||
play= newButton(1100, 340,120,120,C.white,40,pressKey("space"),function()return setting.bgm==0 end),
|
||||
down= newButton(1100, 480,120,120,C.white,60,pressKey("down")),
|
||||
back= newButton(640, 630,230,90, C.white,45,scene.back),
|
||||
bgm= newSlider(760, 80,400,10,35,nil,SETdisp("bgm"),function(i)setting.bgm=i;BGM(bgmPlaying)end),
|
||||
up= newButton(1100, 200,120,120,C.white,55,pressKey("up")),
|
||||
play= newButton(1100, 340,120,120,C.white,35,pressKey("space"),function()return setting.bgm==0 end),
|
||||
down= newButton(1100, 480,120,120,C.white,55,pressKey("down")),
|
||||
back= newButton(640, 630,230,90, C.white,40,scene.back),
|
||||
},
|
||||
custom={
|
||||
up= newButton(1000, 220,100,100,C.white, 50,function()sel=(sel-2)%#customID+1 end),
|
||||
down= newButton(1000, 460,100,100,C.white, 50,function()sel=sel%#customID+1 end),
|
||||
left= newButton(880, 340,100,100,C.white, 50,pressKey("left")),
|
||||
right= newButton(1120, 340,100,100,C.white, 50,pressKey("right")),
|
||||
start1= newButton(880, 580,220,70, C.green, 40,function()scene.push()loadGame(0,1)end),
|
||||
start2= newButton(1120, 580,220,70, C.lightPurple, 40,function()scene.push()loadGame(0,2)end),
|
||||
draw= newButton(1000, 90, 190,85, C.cyan, 40,function()scene.push()scene.swapTo("draw")end),
|
||||
set1= newButton(640, 160,240,75, C.lightRed, 40,function()useDefaultSet(1)end),
|
||||
set2= newButton(640, 250,240,75, C.lightRed, 40,function()useDefaultSet(2)end),
|
||||
set3= newButton(640, 340,240,75, C.lightRed, 40,function()useDefaultSet(3)end),
|
||||
set4= newButton(640, 430,240,75, C.lightRed, 40,function()useDefaultSet(4)end),
|
||||
set5= newButton(640, 520,240,75, C.lightRed, 40,function()useDefaultSet(5)end),
|
||||
back= newButton(640, 630,180,60, C.white, 40,scene.back),
|
||||
up= newButton(1000, 220,100,100,C.white, 45,function()sel=(sel-2)%#customID+1 end),
|
||||
down= newButton(1000, 460,100,100,C.white, 45,function()sel=sel%#customID+1 end),
|
||||
left= newButton(880, 340,100,100,C.white, 45,pressKey("left")),
|
||||
right= newButton(1120, 340,100,100,C.white, 45,pressKey("right")),
|
||||
start1= newButton(880, 580,220,70, C.lightGreen, 35,function()scene.push()loadGame(0,1)end),
|
||||
start2= newButton(1120, 580,220,70, C.lightPurple, 35,function()scene.push()loadGame(0,2)end),
|
||||
draw= newButton(1000, 90, 190,85, C.lightCyan, 35,function()scene.push()scene.swapTo("draw")end),
|
||||
set1= newButton(640, 160,240,75, C.lightYellow, 35,function()useDefaultSet(1)end),
|
||||
set2= newButton(640, 250,240,75, C.lightYellow, 35,function()useDefaultSet(2)end),
|
||||
set3= newButton(640, 340,240,75, C.lightYellow, 35,function()useDefaultSet(3)end),
|
||||
set4= newButton(640, 430,240,75, C.lightYellow, 35,function()useDefaultSet(4)end),
|
||||
set5= newButton(640, 520,240,75, C.lightYellow, 35,function()useDefaultSet(5)end),
|
||||
back= newButton(640, 630,180,60, C.white, 35,scene.back),
|
||||
},
|
||||
draw={
|
||||
block1= newButton(920, 80, 120,120,C.red, 65,setPen(1)),
|
||||
block2= newButton(1060, 80, 120,120,C.green, 65,setPen(2)),
|
||||
block3= newButton(1200, 80, 120,120,C.orange, 65,setPen(3)),
|
||||
block4= newButton(920, 220,120,120,C.blue, 65,setPen(4)),
|
||||
block5= newButton(1060, 220,120,120,C.magenta, 65,setPen(5)),
|
||||
block6= newButton(1200, 220,120,120,C.yellow, 65,setPen(6)),
|
||||
block7= newButton(920, 360,120,120,C.cyan, 65,setPen(7)),
|
||||
gb1= newButton(1060, 360,120,120,C.darkGrey, 65,setPen(9)),
|
||||
gb2= newButton(1200, 360,120,120,C.grey, 65,setPen(10)),
|
||||
gb3= newButton(920, 500,120,120,C.darkPurple, 65,setPen(11)),
|
||||
gb4= newButton(1060, 500,120,120,C.darkRed, 65,setPen(12)),
|
||||
gb5= newButton(1200, 500,120,120,C.darkGreen, 65,setPen(13)),
|
||||
clear= newButton(780, 80, 120,120,C.white, 45,pressKey("delete")),
|
||||
any= newButton(780, 220,120,120,C.lightGrey, 45,setPen(0)),
|
||||
space= newButton(780, 360,120,120,C.grey, 70,setPen(-1)),
|
||||
back= newButton(1200, 640,120,120,C.white, 40,scene.back),
|
||||
block1= newButton(920, 80, 120,120,C.red, 60,setPen(1)),
|
||||
block2= newButton(1060, 80, 120,120,C.green, 60,setPen(2)),
|
||||
block3= newButton(1200, 80, 120,120,C.orange, 60,setPen(3)),
|
||||
block4= newButton(920, 220,120,120,C.blue, 60,setPen(4)),
|
||||
block5= newButton(1060, 220,120,120,C.magenta, 60,setPen(5)),
|
||||
block6= newButton(1200, 220,120,120,C.yellow, 60,setPen(6)),
|
||||
block7= newButton(920, 360,120,120,C.cyan, 60,setPen(7)),
|
||||
gb1= newButton(1060, 360,120,120,C.darkGrey, 60,setPen(9)),
|
||||
gb2= newButton(1200, 360,120,120,C.grey, 60,setPen(10)),
|
||||
gb3= newButton(920, 500,120,120,C.darkPurple, 60,setPen(11)),
|
||||
gb4= newButton(1060, 500,120,120,C.darkRed, 60,setPen(12)),
|
||||
gb5= newButton(1200, 500,120,120,C.darkGreen, 60,setPen(13)),
|
||||
clear= newButton(780, 80, 120,120,C.white, 40,pressKey("delete")),
|
||||
any= newButton(780, 220,120,120,C.lightGrey, 40,setPen(0)),
|
||||
space= newButton(780, 360,120,120,C.grey, 65,setPen(-1)),
|
||||
back= newButton(1200, 640,120,120,C.white, 35,scene.back),
|
||||
},
|
||||
play={
|
||||
pause= newButton(1235,45,80,80,C.white,30,pauseGame),
|
||||
pause= newButton(1235,45,80,80,C.white,25,pauseGame),
|
||||
},
|
||||
pause={
|
||||
resume= newButton(640,290,240,100,C.white,50,resumeGame),
|
||||
restart=newButton(640,445,240,100,C.white,50,function()
|
||||
resume= newButton(640,290,240,100,C.white,45,resumeGame),
|
||||
restart=newButton(640,445,240,100,C.white,45,function()
|
||||
clearTask("play")
|
||||
updateStat()
|
||||
resetGameData()
|
||||
scene.swapTo("play","none")
|
||||
end),
|
||||
setting=newButton(1150,80,200,100,C.yellow,45,function()
|
||||
setting=newButton(1150,80,200,100,C.yellow,40,function()
|
||||
scene.push()
|
||||
scene.swapTo("setting_sound")
|
||||
end),
|
||||
quit= newButton(640,600,240,100,C.white,50,scene.back),
|
||||
quit= newButton(640,600,240,100,C.white,45,scene.back),
|
||||
},
|
||||
setting_game={
|
||||
graphic=newButton(200,80,240,80,C.lightGreen,40,function()scene.swapTo("setting_graphic")end, nil,"sound"),
|
||||
sound= newButton(1080,80,240,80,C.lightGreen,40,function()scene.swapTo("setting_sound")end, nil,"dasD"),
|
||||
graphic=newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_graphic")end, nil,"sound"),
|
||||
sound= newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_sound")end, nil,"dasD"),
|
||||
dasD= newButton(180,230,50,50,C.white,40,function()
|
||||
setting.das=(setting.das-1)%31
|
||||
if setting.arr>setting.das then
|
||||
@@ -434,24 +445,24 @@ Widget={
|
||||
sddasU= newButton(400,340,50,50,C.white,40, function()setting.sddas=(setting.sddas+1)%11 end, nil,"sdarrD"),
|
||||
sdarrD= newButton(500,340,50,50,C.white,40, function()setting.sdarr=(setting.sdarr-1)%4 end, nil,"sdarrU"),
|
||||
sdarrU= newButton(720,340,50,50,C.white,40, function()setting.sdarr=(setting.sdarr+1)%4 end, nil,"quickR"),
|
||||
quickR= newSwitch(560,430,40,SETdisp("quickR"), SETrev("quickR"), nil,"swap"),
|
||||
swap= newSwitch(560,510,25,SETdisp("swap"), SETrev("swap"), nil,"fine"),
|
||||
fine= newSwitch(560,590,25,SETdisp("fine"), SETrev("fine"), nil,"ctrl"),
|
||||
ctrl= newButton(1020,230,320,80,C.white,40,function()scene.push()scene.swapTo("setting_key")end, nil,"touch"),
|
||||
touch= newButton(1020,340,320,80,C.white,40,function()scene.push()scene.swapTo("setting_touch")end,nil,"back"),
|
||||
back= newButton(1160,600,160,160,C.white,55,scene.back,nil,"graphic"),
|
||||
quickR= newSwitch(580,430,35,SETdisp("quickR"), SETrev("quickR"), nil,"swap"),
|
||||
swap= newSwitch(580,510,20,SETdisp("swap"), SETrev("swap"), nil,"fine"),
|
||||
fine= newSwitch(580,590,20,SETdisp("fine"), SETrev("fine"), nil,"ctrl"),
|
||||
ctrl= newButton(1020,230,320,80,C.white,35,function()scene.push()scene.swapTo("setting_key")end, nil,"touch"),
|
||||
touch= newButton(1020,340,320,80,C.white,35,function()scene.push()scene.swapTo("setting_touch")end,nil,"back"),
|
||||
back= newButton(1160,600,160,160,C.white,50,scene.back,nil,"graphic"),
|
||||
},
|
||||
setting_graphic={
|
||||
sound= newButton(200,80,240,80,C.lightGreen,40,function()scene.swapTo("setting_sound")end, nil,"game"),
|
||||
game= newButton(1080,80,240,80,C.lightGreen,40,function()scene.swapTo("setting_game")end, nil,"ghost"),
|
||||
ghost= newSwitch(310,180,40,SETdisp("ghost"), SETdisp("ghost"), nil,"center"),
|
||||
center= newSwitch(580,180,40,SETdisp("center"), SETdisp("center"), nil,"smo"),
|
||||
smo= newSwitch(310,260,25,SETdisp("smo"), SETdisp("smo"), nil,"grid"),
|
||||
grid= newSwitch(580,260,40,SETdisp("grid"), SETdisp("grid"), nil,"dropFX"),
|
||||
dropFX= newSlider(310,350,373,3,40,nil,SETdisp("dropFX"), SETsto("dropFX"), nil,"shakeFX"),
|
||||
shakeFX=newSlider(310,430,373,3,40,nil,SETdisp("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
|
||||
atkFX= newSlider(310,510,373,3,40,nil,SETdisp("atkFX"), SETsto("atkFX"), nil,"frame"),
|
||||
frame= newSlider(310,590,373,10,40,nil,function()return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4 end,function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end,nil,"fullscreen"),
|
||||
sound= newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_sound")end, nil,"game"),
|
||||
game= newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_game")end, nil,"ghost"),
|
||||
ghost= newSwitch(310,180,35,SETdisp("ghost"), SETrev("ghost"), nil,"center"),
|
||||
center= newSwitch(580,180,35,SETdisp("center"), SETrev("center"), nil,"smo"),
|
||||
smo= newSwitch(310,260,25,SETdisp("smo"), SETrev("smo"), nil,"grid"),
|
||||
grid= newSwitch(580,260,30,SETdisp("grid"), SETrev("grid"), nil,"dropFX"),
|
||||
dropFX= newSlider(310,350,373,5,35,nil,SETdisp("dropFX"), SETsto("dropFX"), nil,"shakeFX"),
|
||||
shakeFX=newSlider(310,430,373,5,35,nil,SETdisp("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
|
||||
atkFX= newSlider(310,510,373,5,35,nil,SETdisp("atkFX"), SETsto("atkFX"), nil,"frame"),
|
||||
frame= newSlider(310,590,373,10,35,nil,function()return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4 end,function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end,nil,"fullscreen"),
|
||||
fullscreen=newSwitch(990,180,40,SETdisp("fullscreen"),function()
|
||||
setting.fullscreen=not setting.fullscreen
|
||||
love.window.setFullscreen(setting.fullscreen)
|
||||
@@ -459,35 +470,31 @@ Widget={
|
||||
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
|
||||
end
|
||||
end,nil,"bg"),
|
||||
bg= newSwitch(990,250,40,SETdisp("bg"),SETrev("bg"),nil,"bgblock"),
|
||||
bgblock=newSwitch(990,330,40,SETdisp("bgblock"),SETrev("bgblock"),nil,"skin"),--if not setting.bgblock then for i=1,16 do FX_BGblock.list[i].v=3*FX_BGblock.list[i].v end end
|
||||
skin= newButton(860,470,120,60,C.white,40,function()
|
||||
setting.skin=setting.skin%8+1
|
||||
changeBlockSkin(setting.skin)
|
||||
bg= newSwitch(990,250,35,SETdisp("bg"),SETrev("bg"),nil,"bgblock"),
|
||||
bgblock=newSwitch(990,330,35,SETdisp("bgblock"),SETrev("bgblock"),nil,"skin"),--if not setting.bgblock then for i=1,16 do FX_BGblock.list[i].v=3*FX_BGblock.list[i].v end end
|
||||
skin= newButton(810,420,120,60,C.white,35,function()
|
||||
local _=setting.skin%8+1
|
||||
setting.skin=_
|
||||
changeBlockSkin(_)
|
||||
TEXT(skinName[_],850,475,28,"appear")
|
||||
end,nil,"back"),
|
||||
back= newButton(1160,600,160,160,C.white,55,scene.back,nil,"sound"),
|
||||
back= newButton(1160,600,160,160,C.white,50,scene.back,nil,"sound"),
|
||||
},
|
||||
setting_sound={
|
||||
game= newButton(200,80,240,80,C.lightGreen,40,function()scene.swapTo("setting_game")end, nil,"graphic"),
|
||||
graphic=newButton(1080,80,240,80,C.lightGreen,40,function()scene.swapTo("setting_graphic")end, nil,"sfx"),
|
||||
sfx= newSlider(180,250,400,10,40,function()SFX("blip_1")end, SETdisp("sfx"), SETsto("sfx"), nil,"bgm"),
|
||||
bgm= newSlider(750,250,400,10,40,function()BGM(bgmPlaying or"blank")end, SETdisp("bgm"), SETsto("bgm"), nil,"vib"),
|
||||
vib= newSlider(180,440,400,5,40, function()VIB(1)end, SETdisp("vib"), SETsto("vib"), nil,"voc"),
|
||||
voc= newSlider(750,440,400,10,40,function()VOICE("nya")end, SETdisp("voc"), SETsto("voc"), nil,"stereo"),
|
||||
stereo= newSlider(180,630,400,10,40,function()SFX("move",1,-1)SFX("lock",1,1)end, SETdisp("stereo"), SETsto("stereo"),nil,"back"),
|
||||
back=newButton(1160,600,160,160,C.white,55,scene.back,nil,"game"),
|
||||
game= newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_game")end, nil,"graphic"),
|
||||
graphic=newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_graphic")end, nil,"sfx"),
|
||||
sfx= newSlider(180,250,400,10,35,function()SFX("blip_1")end, SETdisp("sfx"), SETsto("sfx"), nil,"bgm"),
|
||||
bgm= newSlider(750,250,400,10,35,function()BGM(bgmPlaying or"blank")end, SETdisp("bgm"), SETsto("bgm"), nil,"vib"),
|
||||
vib= newSlider(180,440,400,5 ,35,function()VIB(1)end, SETdisp("vib"), SETsto("vib"), nil,"voc"),
|
||||
voc= newSlider(750,440,400,10,35,function()VOICE("nya")end, SETdisp("voc"), SETsto("voc"), nil,"stereo"),
|
||||
stereo= newSlider(180,630,400,10,35,function()SFX("move",1,-1)SFX("lock",1,1)end, SETdisp("stereo"), SETsto("stereo"),function()return setting.sfx==0 end,"back"),
|
||||
back=newButton(1160,600,160,160,C.white,50,scene.back,nil,"game"),
|
||||
},
|
||||
setting_key={
|
||||
back=newButton(1140,650,200,80,C.white,50,scene.back),
|
||||
back=newButton(1140,650,200,80,C.white,45,scene.back),
|
||||
},
|
||||
setting_touch={
|
||||
hide= newSwitch(810,140,45,SETdisp("VKSwitch"),SETrev("VKSwitch")),
|
||||
track= newSwitch(810,220,45,SETdisp("VKTrack"),SETrev("VKTrack")),
|
||||
tkset= newButton(450,220,170,80,C.white,30,function()
|
||||
scene.push()
|
||||
scene.swapTo("setting_trackSetting")
|
||||
end,function()return not setting.VKTrack end),
|
||||
default=newButton(450,320,170,80,C.white,40,function()
|
||||
default=newButton(520,80,170,80,C.white,35,function()
|
||||
local D=virtualkeySet[defaultSel]
|
||||
for i=1,#VK_org do
|
||||
VK_org[i].ava=false
|
||||
@@ -502,73 +509,76 @@ Widget={
|
||||
end--Replace keys
|
||||
defaultSel=defaultSel%5+1
|
||||
end),
|
||||
snap= newButton(640,320,170,80,C.white,40,function()
|
||||
snap= newButton(760,80,170,80,C.white,35,function()
|
||||
snapLevel=snapLevel%6+1
|
||||
end),
|
||||
--VK=T,70,50,27/T,130,50,27/T,190,50,27/T,250,50,27/T,310,50,27/T,370,50,27/T,430,50,27/T,490,50,27/T,550,50,27/T,610,50,27/T,670,50,27/T,730,50,27/T,790,50,27/T,850,50,27/T,910,50,27/T,970,50,27/T,739,789,897/T,1090,50,27/T,1150,50,27/T,1210,50,27
|
||||
alpha= newButton(830,320,170,80,C.white,45,function()
|
||||
setting.VKAlpha=(setting.VKAlpha+1)%11
|
||||
--Adjust virtualkey alpha
|
||||
end),
|
||||
icon= newButton(495,420,260,80,C.white,45,SETrev("VKIcon")),
|
||||
--Switch virtualkey icon
|
||||
size= newButton(785,420,260,80,C.white,45,function()
|
||||
if sel then
|
||||
local B=VK_org[sel]
|
||||
B.r=B.r+10
|
||||
if B.r>=150 then B.r=B.r-110 end
|
||||
end
|
||||
end),
|
||||
toggle= newButton(495,520,260,80,C.white,45,function()
|
||||
more= newButton(520,180,170,80,C.white,40,function()
|
||||
scene.push()
|
||||
scene.swapTo("setting_touchSwitch")
|
||||
end),
|
||||
back= newButton(785,520,260,80,C.white,45,scene.back),
|
||||
back= newButton(760,180,170,80,C.white,40,scene.back),
|
||||
size= newSlider(360,120,560,14,40,nil,function()
|
||||
return VK_org[sel].r/10-1
|
||||
end,
|
||||
function(v)
|
||||
if sel then
|
||||
VK_org[sel].r=10+v*10
|
||||
end
|
||||
end,
|
||||
function()return not sel end),
|
||||
},
|
||||
setting_touchSwitch={
|
||||
b1= newSwitch(300,80, 40,VKAdisp(1),VKAcode(1)),
|
||||
b2= newSwitch(300,140, 40,VKAdisp(2),VKAcode(2)),
|
||||
b3= newSwitch(300,200, 40,VKAdisp(3),VKAcode(3)),
|
||||
b4= newSwitch(300,260, 40,VKAdisp(4),VKAcode(4)),
|
||||
b5= newSwitch(300,320, 40,VKAdisp(5),VKAcode(5)),
|
||||
b6= newSwitch(300,380, 40,VKAdisp(6),VKAcode(6)),
|
||||
b7= newSwitch(300,440, 40,VKAdisp(7),VKAcode(7)),
|
||||
b8= newSwitch(300,500, 40,VKAdisp(8),VKAcode(8)),
|
||||
b9= newSwitch(300,560, 40,VKAdisp(9),VKAcode(9)),
|
||||
b10= newSwitch(300,620, 40,VKAdisp(10),VKAcode(10)),
|
||||
b11= newSwitch(760,80, 40,VKAdisp(11),VKAcode(11)),
|
||||
b12= newSwitch(760,140, 40,VKAdisp(12),VKAcode(12)),
|
||||
b13= newSwitch(760,200, 40,VKAdisp(13),VKAcode(13)),
|
||||
b14= newSwitch(760,260, 40,VKAdisp(14),VKAcode(14)),
|
||||
b15= newSwitch(760,320, 40,VKAdisp(15),VKAcode(15)),
|
||||
b16= newSwitch(760,380, 40,VKAdisp(16),VKAcode(16)),
|
||||
b17= newSwitch(760,440, 40,VKAdisp(17),VKAcode(17)),
|
||||
b18= newSwitch(760,500, 40,VKAdisp(18),VKAcode(18)),
|
||||
b19= newSwitch(760,560, 40,VKAdisp(19),VKAcode(19)),
|
||||
b20= newSwitch(760,620, 40,VKAdisp(20),VKAcode(20)),
|
||||
norm= newButton(1080,150,240,80,C.white,50,function()for i=1,20 do VK_org[i].ava=i<11 end end),
|
||||
pro= newButton(1080,300,240,80,C.white,40,function()for i=1,20 do VK_org[i].ava=true end end),
|
||||
back= newButton(1080,600,240,80,C.white,50,scene.back),
|
||||
b1= newSwitch(280,80, 35,VKAdisp(1),VKAcode(1)),
|
||||
b2= newSwitch(280,140, 35,VKAdisp(2),VKAcode(2)),
|
||||
b3= newSwitch(280,200, 35,VKAdisp(3),VKAcode(3)),
|
||||
b4= newSwitch(280,260, 35,VKAdisp(4),VKAcode(4)),
|
||||
b5= newSwitch(280,320, 35,VKAdisp(5),VKAcode(5)),
|
||||
b6= newSwitch(280,380, 35,VKAdisp(6),VKAcode(6)),
|
||||
b7= newSwitch(280,440, 35,VKAdisp(7),VKAcode(7)),
|
||||
b8= newSwitch(280,500, 35,VKAdisp(8),VKAcode(8)),
|
||||
b9= newSwitch(280,560, 35,VKAdisp(9),VKAcode(9)),
|
||||
b10= newSwitch(280,620, 35,VKAdisp(10),VKAcode(10)),
|
||||
b11= newSwitch(620,80, 35,VKAdisp(11),VKAcode(11)),
|
||||
b12= newSwitch(620,140, 35,VKAdisp(12),VKAcode(12)),
|
||||
b13= newSwitch(620,200, 35,VKAdisp(13),VKAcode(13)),
|
||||
b14= newSwitch(620,260, 35,VKAdisp(14),VKAcode(14)),
|
||||
b15= newSwitch(620,320, 35,VKAdisp(15),VKAcode(15)),
|
||||
b16= newSwitch(620,380, 35,VKAdisp(16),VKAcode(16)),
|
||||
b17= newSwitch(620,440, 35,VKAdisp(17),VKAcode(17)),
|
||||
b18= newSwitch(620,500, 35,VKAdisp(18),VKAcode(18)),
|
||||
b19= newSwitch(620,560, 35,VKAdisp(19),VKAcode(19)),
|
||||
b20= newSwitch(620,620, 35,VKAdisp(20),VKAcode(20)),
|
||||
norm= newButton(840,100,240,80,C.white,45,function()for i=1,20 do VK_org[i].ava=i<11 end end),
|
||||
pro= newButton(1120,100,240,80,C.white,35,function()for i=1,20 do VK_org[i].ava=true end end),
|
||||
hide= newSwitch(1170,200,40,SETdisp("VKSwitch"),SETrev("VKSwitch")),
|
||||
track= newSwitch(1170,300,35,SETdisp("VKTrack"),SETrev("VKTrack")),
|
||||
icon= newSwitch(850,300,40,SETdisp("VKIcon"),SETrev("VKIcon")),
|
||||
tkset= newButton(1120,400,240,80,C.white,32,function()
|
||||
scene.push()
|
||||
scene.swapTo("setting_trackSetting")
|
||||
end,function()return not setting.VKTrack end),
|
||||
alpha= newSlider(840,490,400,10,40,nil,SETdisp("VKAlpha"),SETsto("VKAlpha")),
|
||||
back= newButton(1100,600,240,80,C.white,45,scene.back),
|
||||
},
|
||||
setting_trackSetting={
|
||||
VKDodge= newSwitch(400,200, 40,SETdisp("VKDodge"),SETrev("VKDodge")),
|
||||
VKTchW= newSlider(140,310,1000,10,40,nil,SETdisp("VKTchW"),function(i)setting.VKTchW=i;setting.VKCurW=math.max(setting.VKCurW,i)end),
|
||||
VKCurW= newSlider(140,370,1000,10,40,nil,SETdisp("VKCurW"),function(i)setting.VKCurW=i;setting.VKTchW=math.min(setting.VKTchW,i)end),
|
||||
back= newButton(1080,600,240,80,C.white,50,scene.back),
|
||||
VKDodge=newSwitch(400,200, 35,SETdisp("VKDodge"),SETrev("VKDodge")),
|
||||
VKTchW= newSlider(140,310,1000,10,35,nil,SETdisp("VKTchW"),function(i)setting.VKTchW=i;setting.VKCurW=math.max(setting.VKCurW,i)end),
|
||||
VKCurW= newSlider(140,370,1000,10,35,nil,SETdisp("VKCurW"),function(i)setting.VKCurW=i;setting.VKTchW=math.min(setting.VKTchW,i)end),
|
||||
back= newButton(1080,600,240,80,C.white,45,scene.back),
|
||||
},
|
||||
help={
|
||||
his= newButton(1050,520,230,60,C.white,40,function()scene.push()scene.swapTo("history")end,nil,"back"),
|
||||
qq= newButton(1050,600,230,60,C.white,40,function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end, function()return mobile end,"his"),
|
||||
back= newButton(640, 600,180,60,C.white,40,scene.back,nil,"qq"),
|
||||
his= newButton(1050,520,230,60,C.white,35,function()scene.push()scene.swapTo("history")end,nil,"back"),
|
||||
qq= newButton(1050,600,230,60,C.white,35,function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end, function()return mobile end,"his"),
|
||||
back= newButton(640, 600,180,60,C.white,35,scene.back,nil,"qq"),
|
||||
},
|
||||
history={
|
||||
prev= newButton(1155,170,180,180,C.white,70,pressKey("up"),function()return sel==1 end),
|
||||
next= newButton(1155,400,180,180,C.white,70,pressKey("down"),function()return sel==#updateLog-22 end),
|
||||
back= newButton(1155,600,180,90,C.white,40,scene.back),
|
||||
prev= newButton(1155,170,180,180,C.white,65,pressKey("up"),function()return sel==1 end),
|
||||
next= newButton(1155,400,180,180,C.white,65,pressKey("down"),function()return sel==#updateLog-22 end),
|
||||
back= newButton(1155,600,180,90,C.white,35,scene.back),
|
||||
},
|
||||
stat={
|
||||
path= newButton(980,620,250,60,C.white,30,function()love.system.openURL(love.filesystem.getSaveDirectory())end,function()return mobile end,"back"),
|
||||
back= newButton(640,620,180,60,C.white,40,scene.back,nil,"path"),
|
||||
path= newButton(980,620,250,60,C.white,25,function()love.system.openURL(love.filesystem.getSaveDirectory())end,function()return mobile end,"back"),
|
||||
back= newButton(640,620,180,60,C.white,35,scene.back,nil,"path"),
|
||||
},
|
||||
}
|
||||
for _,L in next,Widget do
|
||||
|
||||
165
main.lua
@@ -17,13 +17,14 @@ local mx,my,mouseShow=-20,-20,false
|
||||
local touching--第一触摸ID
|
||||
|
||||
local devMode=0
|
||||
modeSel,levelSel=1,3--初始模式选择
|
||||
modeSel,levelSel=1,3--初始模式选择(saved in setting)
|
||||
players={alive={},human=0}
|
||||
scr={x=0,y=0,w=gc.getWidth(),h=gc.getHeight(),k=1}
|
||||
local scr=scr
|
||||
curBG="none"
|
||||
bgmPlaying=nil
|
||||
voiceQueue={free=0}
|
||||
texts={}
|
||||
virtualkeyDown,virtualkeyPressTime={},{}
|
||||
for i=1,20 do
|
||||
virtualkeyDown[i]=X
|
||||
@@ -41,7 +42,7 @@ function setFont(s)
|
||||
if Fonts[s]then
|
||||
gc.setFont(Fonts[s])
|
||||
else
|
||||
local t=gc.setNewFont("font.ttf",s-5)
|
||||
local t=gc.setNewFont("font.ttf",s)
|
||||
Fonts[s]=t
|
||||
gc.setFont(t)
|
||||
end
|
||||
@@ -61,6 +62,8 @@ require("default_data")
|
||||
require("class")
|
||||
require("ai")
|
||||
require("toolfunc")
|
||||
require("sound")
|
||||
require("text")
|
||||
require("list")
|
||||
require("dataList")
|
||||
require("texture")
|
||||
@@ -72,38 +75,40 @@ require("player")
|
||||
-------------------------------------------------------------
|
||||
local powerInfoCanvas,updatePowerInfo
|
||||
if sys.getPowerInfo()~="unknown"then
|
||||
powerInfoCanvas=gc.newCanvas(147,22)
|
||||
updatePowerInfo=function()
|
||||
powerInfoCanvas=gc.newCanvas(108,27)
|
||||
function updatePowerInfo()
|
||||
local state,pow=sys.getPowerInfo()
|
||||
if state~="unknown"then
|
||||
gc.setCanvas(powerInfoCanvas)gc.push("transform")gc.origin()
|
||||
gc.clear(0,0,0,.3)
|
||||
gc.clear(0,0,0,.25)
|
||||
gc.setLineWidth(4)
|
||||
setFont(25)
|
||||
local charging
|
||||
if state~="battery"then
|
||||
local charging=state=="charging"
|
||||
if state=="nobattery"then
|
||||
gc.setColor(1,1,1)
|
||||
if state=="nobattery"then
|
||||
gc.setLineWidth(2)
|
||||
gc.line(61.5,.5,83.5,22.5)
|
||||
elseif state=="charging"or state=="charged"then
|
||||
gc.draw(chargeImage,84,3)
|
||||
end
|
||||
end
|
||||
if pow then
|
||||
gc.setLineWidth(2)
|
||||
gc.line(74,5,100,22)
|
||||
else
|
||||
if charging then gc.setColor(0,1,0)
|
||||
elseif pow>50 then gc.setColor(1,1,1)
|
||||
elseif pow>26 then gc.setColor(1,1,0)
|
||||
elseif pow<26 then gc.setColor(1,0,0)
|
||||
else gc.setColor(.5,0,1)--special~
|
||||
else gc.setColor(.5,0,1)
|
||||
end
|
||||
gc.rectangle("fill",76,6,pow*.22,14)
|
||||
if pow<100 then
|
||||
setFont(14)
|
||||
gc.setColor(0,0,0)
|
||||
gc.print(pow,77,2)
|
||||
gc.print(pow,77,4)
|
||||
gc.print(pow,79,2)
|
||||
gc.print(pow,79,4)
|
||||
gc.setColor(1,1,1)
|
||||
gc.print(pow,78,3)
|
||||
end
|
||||
::L::
|
||||
gc.rectangle("fill",61,6,pow*.15,10)
|
||||
gc.setColor(1,1,1)
|
||||
gc.draw(batteryImage,58,3)
|
||||
gc.print(pow.."%",94,-3)
|
||||
end
|
||||
gc.print(os.date("%H:%M",os.time()),2,-3)
|
||||
gc.draw(batteryImage,73,3)
|
||||
setFont(25)
|
||||
gc.print(os.date("%H:%M",os.time()),3,-5)
|
||||
gc.pop()gc.setCanvas()
|
||||
end
|
||||
end
|
||||
@@ -115,13 +120,14 @@ local function getNewBlock()
|
||||
t.bn,t.size=FX_BGblock.next,2+3*rnd()
|
||||
t.b=blocks[t.bn][rnd(0,3)]
|
||||
t.x=rnd(-#t.b[1]*t.size*30+100,1180)
|
||||
t.y=-#t.b*30*t.size
|
||||
t.y=0
|
||||
t.ty=720+#t.b*30*t.size
|
||||
t.v=t.size*(1+rnd())
|
||||
FX_BGblock.next=FX_BGblock.next%7+1
|
||||
return t
|
||||
end
|
||||
local function onVirtualkey(x,y)
|
||||
local dist,nearest=1e15
|
||||
local dist,nearest=1e10
|
||||
for K=1,#virtualkey do
|
||||
local b=virtualkey[K]
|
||||
if b.ava then
|
||||
@@ -135,6 +141,21 @@ local function onVirtualkey(x,y)
|
||||
end
|
||||
return nearest
|
||||
end
|
||||
local function onVK_org(x,y)
|
||||
local dist,nearest=1e10
|
||||
for K=1,#VK_org do
|
||||
local b=VK_org[K]
|
||||
if b.ava then
|
||||
local d1=(x-b.x)^2+(y-b.y)^2
|
||||
if d1<b.r^2 then
|
||||
if d1<dist then
|
||||
nearest,dist=K,d1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return nearest
|
||||
end
|
||||
-------------------------------------------------------------
|
||||
local floatWheel=0
|
||||
local function wheelScroll(y)
|
||||
@@ -311,6 +332,14 @@ function touchMove.draw(id,x,y,dx,dy)
|
||||
preField[sy][sx]=pen
|
||||
end
|
||||
end
|
||||
local penKey={
|
||||
["1"]=1,["2"]=2,["3"]=3,
|
||||
q=4, w=5, e=6,
|
||||
a=7, s=9, d=10,
|
||||
z=11, x=12, c=13,
|
||||
tab=0, backspace=0,
|
||||
lshift=-1, lalt=-1,
|
||||
}
|
||||
function keyDown.draw(key)
|
||||
if key=="delete"then
|
||||
if clearSureTime>15 then
|
||||
@@ -334,14 +363,23 @@ function keyDown.draw(key)
|
||||
if sx and sy then
|
||||
preField[sy][sx]=pen
|
||||
end
|
||||
elseif key=="tab"then
|
||||
pen=-1
|
||||
elseif key=="backspace"or key=="lalt"then
|
||||
pen=0
|
||||
elseif key=="escape"then
|
||||
scene.back()
|
||||
else
|
||||
pen=string.find("123qwea#sdzxc",key)or pen
|
||||
pen=penKey[key]or pen
|
||||
end
|
||||
end
|
||||
|
||||
function mouseDown.setting_sound(x,y,k)
|
||||
if Timer()-sel>5 and x>780 and x<980 and y>470 then
|
||||
VOICE("egg")
|
||||
sel=Timer()
|
||||
end
|
||||
end
|
||||
function touchDown.setting_sound(id,x,y)
|
||||
if Timer()-sel>5 and x>780 and x<980 and y>470 then
|
||||
VOICE("egg")
|
||||
sel=Timer()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -436,15 +474,10 @@ end
|
||||
|
||||
function mouseDown.setting_touch(x,y,k)
|
||||
if k==2 then scene.back()end
|
||||
for K=1,#VK_org do
|
||||
local B=VK_org[K]
|
||||
if (x-B.x)^2+(y-B.y)^2<B.r^2 then
|
||||
sel=K
|
||||
end
|
||||
end
|
||||
sel=onVK_org(x,y)or sel
|
||||
end
|
||||
function mouseMove.setting_touch(x,y,dx,dy)
|
||||
if sel and ms.isDown(1)then
|
||||
if sel and ms.isDown(1)and not widget_sel then
|
||||
local B=VK_org[sel]
|
||||
B.x,B.y=B.x+dx,B.y+dy
|
||||
end
|
||||
@@ -457,12 +490,7 @@ function mouseUp.setting_touch(x,y,k)
|
||||
end
|
||||
end
|
||||
function touchDown.setting_touch(id,x,y)
|
||||
for K=1,#VK_org do
|
||||
local B=VK_org[K]
|
||||
if (x-B.x)^2+(y-B.y)^2<B.r^2 then
|
||||
sel=K
|
||||
end
|
||||
end
|
||||
sel=onVK_org(x,y)or sel
|
||||
end
|
||||
function touchUp.setting_touch(id,x,y)
|
||||
if sel then
|
||||
@@ -475,7 +503,7 @@ function touchUp.setting_touch(id,x,y)
|
||||
end
|
||||
end
|
||||
function touchMove.setting_touch(id,x,y,dx,dy)
|
||||
if sel then
|
||||
if sel and not widget_sel then
|
||||
local B=VK_org[sel]
|
||||
B.x,B.y=B.x+dx,B.y+dy
|
||||
end
|
||||
@@ -854,6 +882,7 @@ function love.lowmemory()
|
||||
collectgarbage()
|
||||
end
|
||||
function love.resize(w,h)
|
||||
love.timer.sleep(.26)
|
||||
scr.w,scr.h,scr.r=w,h,h/w
|
||||
if scr.r>=.5625 then
|
||||
scr.k=w/1280
|
||||
@@ -883,8 +912,9 @@ function love.update(dt)
|
||||
end
|
||||
end
|
||||
for i=#FX_BGblock,1,-1 do
|
||||
FX_BGblock[i].y=FX_BGblock[i].y+FX_BGblock[i].v
|
||||
if FX_BGblock[i].y>720 then rem(FX_BGblock,i)end
|
||||
local B=FX_BGblock[i]
|
||||
B.y=B.y+B.v
|
||||
if B.y>B.ty then rem(FX_BGblock,i)end
|
||||
end
|
||||
if setting.bgblock then
|
||||
FX_BGblock.tm=FX_BGblock.tm-1
|
||||
@@ -893,6 +923,18 @@ function love.update(dt)
|
||||
FX_BGblock.tm=rnd(20,30)
|
||||
end
|
||||
end
|
||||
for i=#texts,1,-1 do
|
||||
local t=texts[i]
|
||||
t.c=t.c+t.spd
|
||||
if t.stop then
|
||||
if t.c>t.stop then
|
||||
t.c=t.stop
|
||||
end
|
||||
end
|
||||
if t.c>60 then
|
||||
rem(texts,i)
|
||||
end
|
||||
end
|
||||
if scene.swapping then
|
||||
local S=scene.swap
|
||||
S.time=S.time-1
|
||||
@@ -900,6 +942,8 @@ function love.update(dt)
|
||||
scene.cur=S.tar
|
||||
scene.init(S.tar)
|
||||
widget_sel=nil
|
||||
texts={}
|
||||
collectgarbage()
|
||||
--此时场景切换
|
||||
end
|
||||
if S.time==0 then
|
||||
@@ -923,7 +967,7 @@ function love.update(dt)
|
||||
for i=1,#Q do
|
||||
Q[i]=Q[i+1]
|
||||
end
|
||||
end--放完后放下一个
|
||||
end--放完了,pop出下一个
|
||||
else
|
||||
local n=1
|
||||
local L=voiceBank[Q[1]]
|
||||
@@ -956,7 +1000,7 @@ function love.draw()
|
||||
local size=FX_BGblock[n].size
|
||||
for i=1,#b do for j=1,#b[1]do
|
||||
if b[i][j]then
|
||||
gc.draw(img,FX_BGblock[n].x+(j-1)*30*size,FX_BGblock[n].y+(i-1)*30*size,nil,size)
|
||||
gc.draw(img,FX_BGblock[n].x+(j-1)*30*size,FX_BGblock[n].y-i*30*size,nil,size)
|
||||
end
|
||||
end end
|
||||
end--Draw BG falling blocks
|
||||
@@ -991,7 +1035,14 @@ function love.draw()
|
||||
gc.rectangle("fill",S[7],S[8],S[9],S[10],2)
|
||||
--开关/滑条残影
|
||||
end
|
||||
end--sysFXs
|
||||
end--guiFXs
|
||||
for i=1,#texts do
|
||||
local t=texts[i]
|
||||
local p=t.c
|
||||
gc.setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
|
||||
setFont(t.font)
|
||||
t:draw()
|
||||
end--Floating Texts
|
||||
if scene.swapping then
|
||||
scene.swap.draw(scene.swap.time)
|
||||
end--Swapping animation
|
||||
@@ -1007,7 +1058,7 @@ function love.draw()
|
||||
gc.rectangle("fill",1280,0,d,720)
|
||||
end--扁窗口
|
||||
end--Black side
|
||||
setFont(20)
|
||||
setFont(15)
|
||||
gc.setColor(1,1,1)
|
||||
gc.print(FPS(),5,700)
|
||||
if devMode>0 then
|
||||
@@ -1027,14 +1078,14 @@ function love.run()
|
||||
local PUMP,POLL=love.event.pump,love.event.poll
|
||||
love.resize(gc.getWidth(),gc.getHeight())
|
||||
scene.init("load")--Scene Launch
|
||||
return function()
|
||||
while true do
|
||||
PUMP()
|
||||
for N,a,b,c,d,e in POLL()do
|
||||
if N=="quit"then
|
||||
destroyPlayers()
|
||||
saveData()
|
||||
saveSetting()
|
||||
return 0
|
||||
goto END
|
||||
elseif love[N]then
|
||||
love[N](a,b,c,d,e)
|
||||
end
|
||||
@@ -1053,19 +1104,19 @@ function love.run()
|
||||
T.sleep(.001)
|
||||
end
|
||||
lastFrame=Timer()
|
||||
if Timer()-lastFreshPow>5 then
|
||||
if Timer()-lastFreshPow>1 then
|
||||
updatePowerInfo()
|
||||
lastFreshPow=Timer()
|
||||
end
|
||||
end
|
||||
::END::
|
||||
end
|
||||
|
||||
local fs=love.filesystem
|
||||
userData,userSetting=fs.newFile("userdata"),fs.newFile("usersetting")
|
||||
if fs.getInfo("userdata")then
|
||||
userData,userSetting=love.filesystem.newFile("userdata"),love.filesystem.newFile("usersetting")
|
||||
if love.filesystem.getInfo("userdata")then
|
||||
loadData()
|
||||
end
|
||||
if fs.getInfo("usersetting")then
|
||||
if love.filesystem.getInfo("usersetting")then
|
||||
loadSetting()
|
||||
elseif system=="Android"or system=="iOS" then
|
||||
setting.swap=false
|
||||
|
||||
176
paint.lua
@@ -102,75 +102,6 @@ FX_BGblock={tm=150,next=7,ct=0,list={{v=0},{v=0},{v=0},{v=0},{v=0},{v=0},{v=0},{
|
||||
FX_attack={}--Attack beam
|
||||
FX_badge={}--Badge thrown
|
||||
sysFX={}
|
||||
FX_ripple={}--Ripple&SqrShade
|
||||
textFX={
|
||||
appear=function(t,a)
|
||||
setFont(t.font)
|
||||
gc.setColor(1,1,1,a)
|
||||
mStr(t.text,150,250-t.font*.5+t.dy)
|
||||
end,
|
||||
fly=function(t,a)
|
||||
setFont(t.font)
|
||||
gc.setColor(1,1,1,a)
|
||||
mStr(t.text,150+(t.t-15)^3*.005,250-t.font*.5+t.dy)
|
||||
end,
|
||||
stretch=function(t,a)
|
||||
gc.push("transform")
|
||||
setFont(t.font)
|
||||
gc.translate(150,250+t.dy)
|
||||
if t.t<20 then gc.scale((20-t.t)*.015+1,1)end
|
||||
gc.setColor(1,1,1,a)
|
||||
mStr(t.text,0,-t.font*.5)
|
||||
gc.pop()
|
||||
end,
|
||||
drive=function(t,a)
|
||||
gc.push("transform")
|
||||
setFont(t.font)
|
||||
gc.translate(150,290+t.dy)
|
||||
if t.t<20 then gc.shear((20-t.t)*.05,0)end
|
||||
gc.setColor(1,1,1,a)
|
||||
mStr(t.text,0,-t.font*.5-15)
|
||||
gc.pop()
|
||||
end,
|
||||
spin=function(t,a)
|
||||
gc.push("transform")
|
||||
setFont(t.font)
|
||||
gc.translate(150,250+t.dy)
|
||||
if t.t<20 then
|
||||
gc.rotate((20-t.t)^2*.0015)
|
||||
end
|
||||
gc.setColor(1,1,1,a)
|
||||
mStr(t.text,0,-t.font*.5-8)
|
||||
gc.pop()
|
||||
end,
|
||||
flicker=function(t,a)
|
||||
setFont(t.font)
|
||||
gc.setColor(1,1,1,a*(rnd()+.5))
|
||||
mStr(t.text,150,225-t.font*.5+t.dy)
|
||||
end,
|
||||
zoomout=function(t,a)
|
||||
gc.push("transform")
|
||||
setFont(t.font)
|
||||
local k=t.t^.5*.1+1
|
||||
gc.translate(150,290+t.dy)
|
||||
gc.scale(k,k)
|
||||
gc.setColor(1,1,1,a)
|
||||
mStr(t.text,0,-t.font*.5-5)
|
||||
gc.pop()
|
||||
end,
|
||||
beat=function(t,a)
|
||||
gc.push("transform")
|
||||
setFont(t.font)
|
||||
gc.translate(150,290+t.dy)
|
||||
if t.t<20 then
|
||||
local k=.2*(5+(25-t.t)^.5)-.45
|
||||
gc.scale(k,k)
|
||||
end
|
||||
gc.setColor(1,1,1,a)
|
||||
mStr(t.text,0,-t.font*.5-5)
|
||||
gc.pop()
|
||||
end,
|
||||
}
|
||||
local function drawAtkPointer(x,y)
|
||||
local t=sin(Timer()*20)
|
||||
gc.setColor(.2,.7+t*.2,1,.6+t*.4)
|
||||
@@ -297,15 +228,19 @@ function Pnt.BG.matrix()
|
||||
end
|
||||
|
||||
function Pnt.load()
|
||||
local L=loading
|
||||
gc.setLineWidth(4)
|
||||
gc.setColor(1,1,1,.5)
|
||||
gc.rectangle("fill",300,330,loadprogress*680,60,5)
|
||||
gc.rectangle("fill",300,330,L[2]/L[3]*680,60,5)
|
||||
gc.setColor(1,1,1)
|
||||
gc.rectangle("line",300,330,680,60,5)
|
||||
setFont(40)
|
||||
mStr(text.load[loading],640,335)
|
||||
setFont(30)
|
||||
mStr(loadTip,640,400)
|
||||
setFont(35)
|
||||
gc.print(text.load[L[1]],340,335)
|
||||
if loading[1]~=0 then
|
||||
gc.printf(loading[2].."/"..loading[3],795,335,150,"right")
|
||||
end
|
||||
setFont(25)
|
||||
mStr(L[4],640,400)
|
||||
end
|
||||
function Pnt.intro()
|
||||
gc.stencil(stencil_miniTitle,"replace",1)
|
||||
@@ -327,30 +262,31 @@ function Pnt.main()
|
||||
gc.setColor(1,1,1)
|
||||
gc.draw(coloredTitleImage,60,30,nil,1.3)
|
||||
gc.draw(drawableText.warning,595-drawableText.warning:getWidth(),128)
|
||||
setFont(35)
|
||||
setFont(30)
|
||||
gc.print(gameVersion,70,125)
|
||||
gc.print(system,610,100)
|
||||
gc.print(modes[modeID[modeSel]].level[levelSel],600,373)
|
||||
setFont(30)
|
||||
setFont(25)
|
||||
gc.print(text.modeName[modeSel],600,414)
|
||||
players[1]:demoDraw()
|
||||
players[1]:draw()
|
||||
end
|
||||
function Pnt.mode()
|
||||
gc.setColor(1,1,1)
|
||||
gc.draw(titleImage,830,30)
|
||||
setFont(40)
|
||||
setFont(35)
|
||||
local lv=modes[modeID[modeSel]].level[levelSel]
|
||||
gc.setColor(modeLevelColor[lv]or color.white)
|
||||
mStr(lv,270,215)
|
||||
setFont(30)
|
||||
mStr(lv,270,200)
|
||||
setFont(25)
|
||||
gc.setColor(color.white)
|
||||
mStr(text.modeInfo[modeID[modeSel]],270,255)
|
||||
setFont(80)
|
||||
mStr(text.modeInfo[modeID[modeSel]],270,240)
|
||||
|
||||
setFont(75)
|
||||
gc.setColor(color.grey)
|
||||
mStr(text.modeName[modeSel],643,273)
|
||||
for i=modeSel-2,modeSel+2 do
|
||||
if i>=1 and i<=#modeID then
|
||||
local f=80-abs(i-modeSel)*20
|
||||
local f=75-abs(i-modeSel)*20
|
||||
gc.setColor(i==modeSel and color.white or abs(i-modeSel)==1 and color.grey or color.darkGrey)
|
||||
setFont(f)
|
||||
mStr(text.modeName[i],640,310+70*(i-modeSel)-f*.5)
|
||||
@@ -365,13 +301,13 @@ function Pnt.music()
|
||||
gc.setColor(1,1,1)
|
||||
gc.draw(drawableText.musicRoom,22,23)
|
||||
gc.draw(drawableText.nowPlaying,490,390)
|
||||
setFont(35)
|
||||
setFont(30)
|
||||
for i=1,#musicID do
|
||||
gc.print(musicID[i],50,90+30*i)
|
||||
end
|
||||
gc.draw(titleImage,640,310,nil,1.5,nil,206,35)
|
||||
if bgmPlaying then
|
||||
setFont(50)
|
||||
setFont(45)
|
||||
gc.setColor(sin(Timer()*.5)*.2+.8,sin(Timer()*.7)*.2+.8,sin(Timer())*.2+.8)
|
||||
mStr(bgmPlaying or"",630,460)
|
||||
local t=-Timer()%2.3/2
|
||||
@@ -386,7 +322,7 @@ function Pnt.custom()
|
||||
gc.rectangle("fill",25,95+40*sel,480,40)
|
||||
gc.setColor(.8,.8,.8)gc.draw(drawableText.custom,20,20)
|
||||
gc.setColor(1,1,1)gc.draw(drawableText.custom,22,23)
|
||||
setFont(40)
|
||||
setFont(35)
|
||||
for i=1,#customID do
|
||||
local k=customID[i]
|
||||
local y=90+40*i
|
||||
@@ -408,13 +344,13 @@ function Pnt.draw()
|
||||
gc.setLineWidth(3)
|
||||
gc.rectangle("line",-2,-2,304,604)
|
||||
gc.setLineWidth(2)
|
||||
local cross=puzzleMark[-1]
|
||||
for y=1,20 do for x=1,10 do
|
||||
local B=preField[y][x]
|
||||
if B>0 then
|
||||
gc.draw(blockSkin[B],30*x-30,600-30*y)
|
||||
elseif B==-1 then
|
||||
gc.line(30*x-25,605-30*y,30*x-5,625-30*y)
|
||||
gc.line(30*x-25,625-30*y,30*x-5,605-30*y)
|
||||
gc.draw(cross,30*x-30,600-30*y)
|
||||
end
|
||||
end end
|
||||
if sx and sy then
|
||||
@@ -424,17 +360,17 @@ function Pnt.draw()
|
||||
gc.translate(-200,-60)
|
||||
if clearSureTime>0 then
|
||||
gc.setColor(1,1,1,clearSureTime*.02)
|
||||
gc.draw(drawableText.question,760,11)
|
||||
gc.draw(drawableText.question,660,11)
|
||||
end
|
||||
if pen>0 then
|
||||
gc.setLineWidth(13)
|
||||
gc.setColor(blockColor[pen])
|
||||
gc.rectangle("line",746,460,70,70)
|
||||
gc.rectangle("line",745,460,70,70)
|
||||
elseif pen==-1 then
|
||||
gc.setLineWidth(5)
|
||||
gc.setColor(.9,.9,.9)
|
||||
gc.line(960,620,1000,660)
|
||||
gc.line(960,660,1000,620)
|
||||
gc.line(755,470,805,520)
|
||||
gc.line(755,520,805,470)
|
||||
end
|
||||
end
|
||||
function Pnt.play()
|
||||
@@ -445,12 +381,13 @@ function Pnt.play()
|
||||
for i=1,#FX_attack do
|
||||
local A=FX_attack[i]
|
||||
gc.push("transform")
|
||||
local a=A.t<10 and A.a*A.t*.05 or A.t>50 and A.a*(6-A.t*.1)or A.a
|
||||
local a=(A.t<10 and A.t*.05 or A.t>50 and 6-A.t*.1 or 1)*A.a
|
||||
gc.setColor(A.r,A.g,A.b,a*.5)
|
||||
gc.circle("line",0,0,A.rad,A.corner)
|
||||
local L=A.drag
|
||||
for i=1,#L,2 do
|
||||
gc.setColor(A.r,A.g,A.b,a*i*.05)
|
||||
local len=#L
|
||||
for i=1,len,2 do
|
||||
gc.setColor(A.r,A.g,A.b,.4*a*i/len)
|
||||
gc.translate(L[i],L[i+1])
|
||||
gc.rotate(A.t*.1)
|
||||
gc.circle("fill",0,0,A.rad,A.corner)
|
||||
@@ -483,7 +420,7 @@ function Pnt.play()
|
||||
gc.setColor(.8,1,0,.2)
|
||||
for i=1,#P.atker do
|
||||
local p=P.atker[i]
|
||||
gc.line(p.centerX,p.centerY,P.centerX,P.centerY)
|
||||
gc.line(p.centerX,p.centerY,P.x+300*P.size,P.y+670*P.size)
|
||||
end
|
||||
if P.atkMode~=4 then
|
||||
if P.atking then drawAtkPointer(P.atking.centerX,P.atking.centerY)end
|
||||
@@ -495,7 +432,7 @@ function Pnt.play()
|
||||
end
|
||||
end
|
||||
if restartCount>0 then
|
||||
gc.setColor(0,0,0,restartCount/20)
|
||||
gc.setColor(0,0,0,restartCount*.05)
|
||||
gc.rectangle("fill",0,0,1280,720)
|
||||
end
|
||||
end
|
||||
@@ -504,7 +441,7 @@ function Pnt.pause()
|
||||
gc.setColor(0,0,0,pauseTimer*.015)
|
||||
gc.rectangle("fill",0,0,1280,720)
|
||||
gc.setColor(1,1,1,pauseTimer*.02)
|
||||
setFont(30)
|
||||
setFont(25)
|
||||
if pauseCount>0 then
|
||||
gc.print(text.pauseCount..":["..pauseCount.."] "..format("%0.2f",pauseTime).."s",110,150)
|
||||
end
|
||||
@@ -516,32 +453,42 @@ function Pnt.pause()
|
||||
gc.print(text.stat[i+3],860,30*i+30)
|
||||
gc.print(dataOpt(i),1050,30*i+30)
|
||||
end
|
||||
setFont(40)
|
||||
setFont(35)
|
||||
if system~="Android"then
|
||||
mStr(text.space.."/"..text.enter,640,190)
|
||||
mStr("Ctrl+R",640,351)
|
||||
gc.print("ESC",610,506)
|
||||
end
|
||||
mDraw(gamefinished and drawableText.finish or drawableText.pause,640,60-10*(5-pauseTimer*.1)^1.5)
|
||||
mDraw(gameResult and drawableText[gameResult]or drawableText.pause,640,60-10*(5-pauseTimer*.1)^1.5)
|
||||
end
|
||||
function Pnt.setting_game()
|
||||
gc.setColor(1,1,1)
|
||||
mDraw(drawableText.setting_game,640,15)
|
||||
setFont(40)
|
||||
setFont(35)
|
||||
mStr("DAS:"..setting.das,290,205)
|
||||
mStr("ARR:"..setting.arr,610,205)
|
||||
setFont(28)
|
||||
setFont(23)
|
||||
mStr(text.softdropdas..setting.sddas,290,323)
|
||||
mStr(text.softdroparr..setting.sdarr,610,323)
|
||||
end
|
||||
function Pnt.setting_graphic()
|
||||
gc.setColor(1,1,1)
|
||||
mDraw(drawableText.setting_graphic,640,15)
|
||||
gc.draw(blockSkin[7-int(Timer()*2)%7],940,440,nil,2)
|
||||
gc.draw(blockSkin[7-int(Timer()*2)%7],890,390,nil,2)
|
||||
end
|
||||
function Pnt.setting_sound()
|
||||
gc.setColor(1,1,1)
|
||||
gc.setColor(1,1,1,.8)
|
||||
mDraw(drawableText.setting_sound,640,15)
|
||||
local t=Timer()
|
||||
local x,y=790,370+10*sin(t*.4)
|
||||
gc.translate(x,y)
|
||||
gc.draw(miya_ch,0,0)
|
||||
gc.setColor(1,1,1,.7)
|
||||
gc.draw(miya_f1,4,47+4*sin(t*.9))
|
||||
gc.draw(miya_f2,42,107+5*sin(t))
|
||||
gc.draw(miya_f3,93,126+3*sin(t*.7))
|
||||
gc.draw(miya_f4,129,98+3*sin(t*.7))
|
||||
gc.translate(-x,-y)
|
||||
end
|
||||
function Pnt.setting_key()
|
||||
local a=.3+sin(Timer()*15)*.1
|
||||
@@ -558,7 +505,7 @@ function Pnt.setting_key()
|
||||
200,45
|
||||
)
|
||||
--Selection rect
|
||||
|
||||
|
||||
gc.setColor(1,.3,.3)
|
||||
mDraw(drawableText.keyboard,340,35)
|
||||
mDraw(drawableText.keyboard,940,35)
|
||||
@@ -567,7 +514,7 @@ function Pnt.setting_key()
|
||||
mDraw(drawableText.joystick,1140,35)
|
||||
|
||||
gc.setColor(1,1,1)
|
||||
setFont(31)
|
||||
setFont(26)
|
||||
for N=1,20 do
|
||||
if N<11 then
|
||||
gc.printf(text.actName[N],47,45*N+22,180,"right")
|
||||
@@ -586,13 +533,16 @@ function Pnt.setting_key()
|
||||
for y=65,515,45 do
|
||||
gc.line(40,y,1240,y)
|
||||
end
|
||||
setFont(40)
|
||||
setFont(35)
|
||||
gc.print("Player:",170,590)
|
||||
gc.print(int(curBoard*.5+.5),300,590)
|
||||
gc.print(curBoard.."/8",580,590)
|
||||
gc.draw(drawableText.ctrlSetHelp,50,650)
|
||||
end
|
||||
function Pnt.setting_touch()
|
||||
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)
|
||||
VirtualkeyPreview()
|
||||
local d=snapLevelValue[snapLevel]
|
||||
if d>=10 then
|
||||
@@ -613,12 +563,12 @@ function Pnt.setting_trackSetting()
|
||||
mDraw(drawableText.VKCurW,640+50*setting.VKCurW,380)
|
||||
end
|
||||
function Pnt.help()
|
||||
setFont(30)
|
||||
setFont(25)
|
||||
gc.setColor(1,1,1)
|
||||
for i=1,#text.help do
|
||||
gc.printf(text.help[i],140,10+40*i,1000,"center")
|
||||
end
|
||||
setFont(24)
|
||||
setFont(19)
|
||||
gc.print(text.used,30,330)
|
||||
gc.draw(titleImage,280,620,.1,1+.05*sin(Timer()*2),nil,206,35)
|
||||
gc.setLineWidth(5)
|
||||
@@ -627,13 +577,13 @@ function Pnt.help()
|
||||
gc.draw(payCode,20,20)
|
||||
gc.draw(groupCode,1080,20)
|
||||
gc.setColor(1,1,1,sin(Timer()*10)*.5+.5)
|
||||
setFont(35)
|
||||
setFont(30)
|
||||
mStr(text.support,150,283)
|
||||
setFont(25)
|
||||
setFont(20)
|
||||
mStr(text.group,1170,210)
|
||||
end
|
||||
function Pnt.stat()
|
||||
setFont(28)
|
||||
setFont(23)
|
||||
gc.setColor(1,1,1)
|
||||
for i=1,18 do
|
||||
gc.print(text.stat[i],400,30*i-5)
|
||||
@@ -647,7 +597,7 @@ function Pnt.history()
|
||||
gc.setColor(1,1,1)
|
||||
gc.setLineWidth(4)
|
||||
gc.rectangle("line",30,45,1000,632)
|
||||
setFont(25)
|
||||
setFont(20)
|
||||
for i=0,min(22,#updateLog-sel)do
|
||||
gc.print(updateLog[sel+i],40,50+27*(i))
|
||||
end
|
||||
|
||||
1340
player.lua
31
scene.lua
@@ -13,10 +13,12 @@ local scene={
|
||||
local sceneInit={
|
||||
quit=love.event.quit,
|
||||
load=function()
|
||||
loading=1--Loading mode
|
||||
loadnum=1--Loading counter
|
||||
loadprogress=0--Loading bar(0~1)
|
||||
loadTip=text.tips[math.random(#text.tips)]
|
||||
loading={
|
||||
1,--Loading mode
|
||||
1,--Loading counter
|
||||
#voiceName,--Loading bar lenth(current)
|
||||
text.tips[math.random(#text.tips)],--tip
|
||||
}
|
||||
end,
|
||||
intro=function()
|
||||
count=0
|
||||
@@ -30,7 +32,6 @@ local sceneInit={
|
||||
if not players[1]then
|
||||
newDemoPlayer(1,900,35,1.1)
|
||||
end--create demo player
|
||||
collectgarbage()
|
||||
end,
|
||||
music=function()
|
||||
if bgmPlaying then
|
||||
@@ -81,6 +82,7 @@ local sceneInit={
|
||||
curBG="none"
|
||||
end,
|
||||
setting_sound=function()
|
||||
sel=0--last sound time
|
||||
curBG="none"
|
||||
end,
|
||||
setting_key=function()
|
||||
@@ -125,19 +127,19 @@ local swapDeck_data={
|
||||
}--Block id [ZSLJTOI] ,dir,x,y
|
||||
local gc=love.graphics
|
||||
local swap={
|
||||
none={1,0,NULL},
|
||||
flash={8,1,function()gc.clear(1,1,1)end},
|
||||
fade={30,15,function(t)
|
||||
none={1,0,nil,NULL},
|
||||
flash={8,1,nil,function()gc.clear(1,1,1)end},
|
||||
fade={30,15,"swipe",function(t)
|
||||
local t=t>15 and 2-t/15 or t/15
|
||||
gc.setColor(0,0,0,t)
|
||||
gc.rectangle("fill",0,0,1280,720)
|
||||
end},
|
||||
slowFade={180,90,function(t)
|
||||
slowFade={180,90,nil,function(t)
|
||||
local t=t>90 and 2-t/90 or t/90
|
||||
gc.setColor(0,0,0,t)
|
||||
gc.rectangle("fill",0,0,1280,720)
|
||||
end},
|
||||
deck={50,8,function(t)
|
||||
deck={50,8,nil,function(t)
|
||||
gc.setColor(1,1,1)
|
||||
if t>8 then
|
||||
local t=t<15 and 15 or t
|
||||
@@ -190,11 +192,12 @@ function scene.swapTo(tar,style)
|
||||
if not style then style="fade"end
|
||||
S.tar=tar
|
||||
S.style=style
|
||||
S.time=swap[style][1]
|
||||
S.mid=swap[style][2]
|
||||
S.draw=swap[style][3]
|
||||
local swap=swap[style]
|
||||
S.time=swap[1]
|
||||
S.mid=swap[2]
|
||||
if swap[3]then SFX(swap[3])end
|
||||
S.draw=swap[4]
|
||||
widget_sel=nil
|
||||
if style~="none"then SFX("swipe")end
|
||||
end
|
||||
end
|
||||
function scene.back()
|
||||
|
||||
85
sound.lua
Normal file
@@ -0,0 +1,85 @@
|
||||
local rnd=math.random
|
||||
local rem=table.remove
|
||||
local vibrateLevel={0,.015,.02,.03,.04,.05,.06,.07,.08,.09}
|
||||
function VIB(t)
|
||||
if setting.vib>0 then
|
||||
love.system.vibrate(vibrateLevel[setting.vib+t])
|
||||
end
|
||||
end
|
||||
function SFX(s,v,pos)
|
||||
if setting.sfx>0 then
|
||||
local S=sfx[s]--AU_Queue
|
||||
local n=1
|
||||
while S[n]:isPlaying()do
|
||||
n=n+1
|
||||
if not S[n]then
|
||||
S[n]=S[n-1]:clone()
|
||||
S[n]:seek(0)
|
||||
break
|
||||
end
|
||||
end
|
||||
S=S[n]--AU_SRC
|
||||
if S:getChannelCount()==1 then
|
||||
if pos then
|
||||
pos=pos*setting.stereo*.1
|
||||
S:setPosition(pos,1-pos^2,0)
|
||||
else
|
||||
S:setPosition(0,0,0)
|
||||
end
|
||||
end
|
||||
S:setVolume((v or 1)*setting.sfx*.1)
|
||||
S:play()
|
||||
end
|
||||
end
|
||||
function getFreeVoiceChannel()
|
||||
local i=#voiceQueue
|
||||
for i=1,i do
|
||||
if #voiceQueue[i]==0 then return i end
|
||||
end
|
||||
voiceQueue[i+1]={}
|
||||
return i+1
|
||||
end
|
||||
function VOICE(s,chn)
|
||||
if setting.voc>0 then
|
||||
if chn then
|
||||
voiceQueue[chn][#voiceQueue[chn]+1]=voiceList[s][rnd(#voiceList[s])]
|
||||
--添加到[chn]
|
||||
else
|
||||
voiceQueue[getFreeVoiceChannel()]={voiceList[s][rnd(#voiceList[s])]}
|
||||
--自动查找/创建空轨
|
||||
end
|
||||
end
|
||||
end
|
||||
function BGM(s)
|
||||
if setting.bgm>0 then
|
||||
if bgmPlaying~=s then
|
||||
if bgmPlaying then newTask(Event_task.bgmFadeOut,nil,bgmPlaying)end
|
||||
for i=#Task,1,-1 do
|
||||
local T=Task[i]
|
||||
if T.code==Event_task.bgmFadeIn then
|
||||
T.code=Event_task.bgmFadeOut
|
||||
elseif T.code==Event_task.bgmFadeOut and T.data==s then
|
||||
rem(Task,i)
|
||||
end
|
||||
end
|
||||
if s then
|
||||
newTask(Event_task.bgmFadeIn,nil,s)
|
||||
bgm[s]:play()
|
||||
end
|
||||
bgmPlaying=s
|
||||
else
|
||||
if bgmPlaying then
|
||||
local v=setting.bgm*.1
|
||||
bgm[bgmPlaying]:setVolume(v)
|
||||
if v>0 then
|
||||
bgm[bgmPlaying]:play()
|
||||
else
|
||||
bgm[bgmPlaying]:pause()
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif bgmPlaying then
|
||||
bgm[bgmPlaying]:pause()
|
||||
bgmPlaying=nil
|
||||
end
|
||||
end
|
||||
105
text.lua
Normal file
@@ -0,0 +1,105 @@
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local mStr=mStr
|
||||
local rem=table.remove
|
||||
|
||||
local textFX={}
|
||||
function textFX.appear(t)
|
||||
mStr(t.text,t.x,t.y-t.font*.7)
|
||||
end
|
||||
function textFX.fly(t)
|
||||
mStr(t.text,t.x+(t.c-.5)^3*300,t.y-t.font*.7)
|
||||
end
|
||||
function textFX.stretch(t)
|
||||
gc.push("transform")
|
||||
gc.translate(t.x,t.y)
|
||||
if t.c<.3 then gc.scale((.3-t.c)*1.6+1,1)end
|
||||
mStr(t.text,0,-t.font*.7)
|
||||
gc.pop()
|
||||
end
|
||||
function textFX.drive(t)
|
||||
gc.push("transform")
|
||||
gc.translate(t.x,t.y)
|
||||
if t.c<.3 then gc.shear((.3-t.c)*2,0)end
|
||||
mStr(t.text,0,-t.font*.7)
|
||||
gc.pop()
|
||||
end
|
||||
function textFX.spin(t)
|
||||
gc.push("transform")
|
||||
gc.translate(t.x,t.y)
|
||||
if t.c<.3 then
|
||||
gc.rotate((.3-t.c)^2*4)
|
||||
end
|
||||
mStr(t.text,0,-t.font*.7)
|
||||
gc.pop()
|
||||
end
|
||||
function textFX.flicker(t)
|
||||
local _,τ,T,Τ=gc.getColor()
|
||||
gc.setColor(_,τ,T,Τ*(rnd()+.5))
|
||||
mStr(t.text,t.x,t.y-t.font*.7)
|
||||
end
|
||||
function textFX.zoomout(t)
|
||||
gc.push("transform")
|
||||
local k=t.c^.5*.1+1
|
||||
gc.translate(t.x,t.y)
|
||||
gc.scale(k,k)
|
||||
mStr(t.text,0,-t.font*.7)
|
||||
gc.pop()
|
||||
end
|
||||
function textFX.beat(t)
|
||||
gc.push("transform")
|
||||
gc.translate(t.x,t.y)
|
||||
if t.c<.3 then
|
||||
local k=1.3-t.c^2/.3
|
||||
gc.scale(k,k)
|
||||
end
|
||||
mStr(t.text,0,-t.font*.7)
|
||||
gc.pop()
|
||||
end
|
||||
function getTEXT(text,x,y,font,style,spd,stop)
|
||||
return{
|
||||
c=0,
|
||||
text=text,
|
||||
x=x or 0,
|
||||
y=y or 0,
|
||||
font=font or 40,
|
||||
spd=(spd or 1)/60,
|
||||
stop=stop,
|
||||
draw=textFX[style]or error("unavailable type:"..style),
|
||||
}
|
||||
end--another version of TEXT()
|
||||
function TEXT(text,x,y,font,style,spd,stop)
|
||||
texts[#texts+1]={
|
||||
c=0, --timer
|
||||
text=text, --string
|
||||
x=x or 0, --x
|
||||
y=y or 0, --y
|
||||
font=font or 40, --font
|
||||
spd=(spd or 1)/60, --timing speed(1=last 1 sec)
|
||||
stop=stop, --stop time(sustained text)
|
||||
draw=textFX[style]or error("unavailable type:"..style), --draw method
|
||||
}
|
||||
end
|
||||
function updateText(list)
|
||||
for i=#list,1,-1 do
|
||||
local t=list[i]
|
||||
t.c=t.c+t.spd
|
||||
if t.stop then
|
||||
if t.c>t.stop then
|
||||
t.c=t.stop
|
||||
end
|
||||
end
|
||||
if t.c>60 then
|
||||
rem(list,i)
|
||||
end
|
||||
end
|
||||
end
|
||||
function drawTexts(list)
|
||||
for i=1,#list do
|
||||
local t=list[i]
|
||||
local p=t.c
|
||||
gc.setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
|
||||
setFont(t.font)
|
||||
t:draw()
|
||||
end
|
||||
end
|
||||
46
texture.lua
@@ -1,12 +1,13 @@
|
||||
local gc=love.graphics
|
||||
local N,c=gc.newImage
|
||||
local N=gc.newImage
|
||||
local int=math.floor
|
||||
local function T(s,t)return gc.newText(setFont(s),t)end
|
||||
local function C(x,y)
|
||||
c=gc.newCanvas(x,y)
|
||||
local c=gc.newCanvas(x,y)
|
||||
gc.setCanvas(c)
|
||||
return c
|
||||
end
|
||||
local c
|
||||
|
||||
gc.setDefaultFilter("nearest","nearest")
|
||||
blockImg=N("/image/block.png")
|
||||
@@ -36,15 +37,38 @@ for i=1,7 do
|
||||
end end
|
||||
end
|
||||
|
||||
puzzleMark={}
|
||||
gc.setLineWidth(3)
|
||||
for i=1,13 do
|
||||
puzzleMark[i]=C(30,30)
|
||||
if i>7 then
|
||||
gc.setColor(blockColor[i])
|
||||
gc.rectangle("line",7,7,16,16)
|
||||
else
|
||||
local c=blockColor[i]
|
||||
gc.setColor(c[1],c[2],c[3],.6)
|
||||
gc.rectangle("line",5,5,20,20)
|
||||
gc.rectangle("line",10,10,10,10)
|
||||
end
|
||||
end
|
||||
c=C(30,30)
|
||||
gc.setColor(1,1,1)
|
||||
gc.line(5,5,25,25)
|
||||
gc.line(5,25,25,5)
|
||||
puzzleMark[-1]=C(30,30)
|
||||
gc.setColor(1,1,1,.9)
|
||||
gc.draw(c)
|
||||
c:release()
|
||||
|
||||
PTC={dust={}}--Particle systems
|
||||
C(6,6)
|
||||
c=C(6,6)
|
||||
gc.clear(1,1,1)
|
||||
PTC.dust0=gc.newParticleSystem(c,1000)
|
||||
c:release()
|
||||
PTC.dust0:setParticleLifetime(.2,.3)
|
||||
PTC.dust0:setEmissionRate(0)
|
||||
PTC.dust0:setLinearAcceleration(-1500,-200,1500,200)
|
||||
PTC.dust0:setColors(1,1,1,.5,1,1,1,0)
|
||||
c:release()
|
||||
--Dust particles
|
||||
|
||||
gc.setDefaultFilter("linear","linear")
|
||||
@@ -55,12 +79,17 @@ dialNeedle=N("/image/mess/dialNeedle.png")
|
||||
badgeIcon=N("/image/mess/badge.png")
|
||||
spinCenter=N("/image/mess/spinCenter.png")
|
||||
batteryImage=N("/image/mess/power.png")
|
||||
chargeImage=N("/image/mess/charge.png")
|
||||
|
||||
background1=N("/image/BG/bg1.jpg")
|
||||
background2=N("/image/BG/bg2.png")
|
||||
groupCode=N("/image/mess/groupcode.png")
|
||||
payCode=N("/image/mess/paycode.png")
|
||||
|
||||
miya_ch=N("/image/miya/ch.png")
|
||||
miya_f1=N("/image/miya/f1.png")
|
||||
miya_f2=N("/image/miya/f2.png")
|
||||
miya_f3=N("/image/miya/f3.png")
|
||||
miya_f4=N("/image/miya/f4.png")
|
||||
drawableText={
|
||||
question=T(100,"?"),
|
||||
bpm=T(15,"BPM"),kpm=T(15,"KPM"),
|
||||
@@ -76,12 +105,15 @@ drawableText={
|
||||
nextWave=T(30,"Next"),
|
||||
combo=T(20,"Combo"),
|
||||
mxcmb=T(20,"Max Combo"),
|
||||
pc=T(22,"Perfect Clear"),
|
||||
pc=T(20,"Perfect Clear"),
|
||||
ko=T(25,"KO"),
|
||||
|
||||
modeName=T(30),levelName=T(30),
|
||||
next=T(40),hold=T(40),
|
||||
pause=T(120),finish=T(120),
|
||||
|
||||
win=T(120),finish=T(120),
|
||||
lose=T(120),pause=T(120),
|
||||
|
||||
custom=T(80),
|
||||
setting_game=T(80),setting_graphic=T(80),setting_sound=T(80),
|
||||
keyboard=T(25),joystick=T(25),
|
||||
|
||||
73
timer.lua
@@ -6,46 +6,41 @@ local ins,rem=table.insert,table.remove
|
||||
local Tmr={}
|
||||
function Tmr.load()
|
||||
local t=Timer()
|
||||
local L=loading
|
||||
::R::
|
||||
if loading==1 then
|
||||
if loadnum<=#voiceName then
|
||||
local N=voiceName[loadnum]
|
||||
for i=1,#voiceList[N]do
|
||||
voiceBank[voiceList[N][i]]={love.audio.newSource("VOICE/"..voiceList[N][i]..".ogg","static")}
|
||||
end
|
||||
loadprogress=loadnum/#voiceName
|
||||
loadnum=loadnum+1
|
||||
else
|
||||
loading=2
|
||||
loadnum=1
|
||||
if L[1]==1 then
|
||||
local N=voiceName[L[2]]
|
||||
for i=1,#voiceList[N]do
|
||||
local V=voiceList[N][i]
|
||||
voiceBank[V]={love.audio.newSource("VOICE/"..V..".ogg","static")}
|
||||
end
|
||||
elseif loading==2 then
|
||||
if loadnum<=#bgm then
|
||||
local N=bgm[loadnum]
|
||||
bgm[N]=love.audio.newSource("/BGM/"..N..".ogg","stream")
|
||||
bgm[N]:setLooping(true)
|
||||
bgm[N]:setVolume(0)
|
||||
loadprogress=loadnum/#bgm
|
||||
loadnum=loadnum+1
|
||||
else
|
||||
L[2]=L[2]+1
|
||||
if L[2]>L[3]then
|
||||
L[1],L[2],L[3]=2,1,#bgm
|
||||
end
|
||||
elseif L[1]==2 then
|
||||
local N=bgm[L[2]]
|
||||
bgm[N]=love.audio.newSource("/BGM/"..N..".ogg","stream")
|
||||
bgm[N]:setLooping(true)
|
||||
bgm[N]:setVolume(0)
|
||||
L[2]=L[2]+1
|
||||
if L[2]>L[3]then
|
||||
for i=1,#bgm do bgm[i]=nil end
|
||||
loading=3
|
||||
loadnum=1
|
||||
L[1],L[2],L[3]=3,1,#sfx
|
||||
end
|
||||
elseif loading==3 then
|
||||
if loadnum<=#sfx then
|
||||
sfx[sfx[loadnum]]={love.audio.newSource("/SFX/"..sfx[loadnum]..".ogg","static")}
|
||||
loadprogress=loadnum/#sfx
|
||||
loadnum=loadnum+1
|
||||
else
|
||||
for i=1,#sfx do sfx[i]=nil end
|
||||
loading=4
|
||||
loadnum=1
|
||||
elseif L[1]==3 then
|
||||
local S=sfx[L[2]]
|
||||
sfx[S]={love.audio.newSource("/SFX/"..S..".ogg","static")}
|
||||
L[2]=L[2]+1
|
||||
if L[2]>L[3]then
|
||||
for i=1,L[2]do sfx[i]=nil end
|
||||
L[1],L[2],L[3]=0,1,1
|
||||
SFX("welcome",.2)
|
||||
end
|
||||
elseif loading==4 then
|
||||
loadnum=loadnum+1
|
||||
if loadnum==48 then
|
||||
else
|
||||
L[2]=L[2]+1
|
||||
L[3]=L[2]
|
||||
if L[2]>50 then
|
||||
stat.run=stat.run+1
|
||||
scene.swapTo("intro","none")
|
||||
end
|
||||
@@ -68,7 +63,7 @@ function Tmr.play(dt)
|
||||
local b=FX_attack[i]
|
||||
b.t=b.t+1
|
||||
if b.t>50 then
|
||||
b.rad=b.rad*1.08+.2
|
||||
b.rad=b.rad*1.05+.1
|
||||
b.x,b.y=b.x2,b.y2
|
||||
elseif b.t>10 then
|
||||
local t=((b.t-10)*.025)t=(3-2*t)*t*t
|
||||
@@ -76,12 +71,12 @@ function Tmr.play(dt)
|
||||
end
|
||||
if b.t<60 then
|
||||
local L=FX_attack[i].drag
|
||||
if #L==6*setting.atkFX then
|
||||
if #L==4*setting.atkFX then
|
||||
rem(L,1)rem(L,1)
|
||||
end
|
||||
ins(L,b.x)ins(L,b.y)
|
||||
else
|
||||
for i=1,#FX_attack do
|
||||
for i=i,#FX_attack do
|
||||
FX_attack[i]=FX_attack[i+1]
|
||||
end
|
||||
end
|
||||
@@ -129,7 +124,7 @@ function Tmr.play(dt)
|
||||
return
|
||||
end
|
||||
elseif restartCount>0 then
|
||||
restartCount=max(restartCount-2,0)
|
||||
restartCount=restartCount>2 and restartCount-2 or 0
|
||||
end--Counting,include pre-das,directy RETURN,or restart counting
|
||||
for p=1,#players do
|
||||
local P=players[p]
|
||||
@@ -138,7 +133,7 @@ function Tmr.play(dt)
|
||||
if modeEnv.royaleMode and frame%120==0 then freshMostDangerous()end
|
||||
end
|
||||
function Tmr.pause(dt)
|
||||
if not gamefinished then
|
||||
if not gameResult then
|
||||
pauseTime=pauseTime+dt
|
||||
end
|
||||
if pauseTimer<50 and not wd.isMinimized()then
|
||||
|
||||
130
toolfunc.lua
@@ -1,7 +1,6 @@
|
||||
local tm=love.timer
|
||||
local gc=love.graphics
|
||||
local kb=love.keyboard
|
||||
local setFont=setFont
|
||||
local int,abs,rnd,max,min=math.floor,math.abs,math.random,math.max,math.min
|
||||
local sub,find=string.sub,string.find
|
||||
local ins,rem=table.insert,table.remove
|
||||
@@ -71,7 +70,7 @@ langName={"中文","全中文","English"}
|
||||
local langID={"chi","chi_full","eng"}
|
||||
local drawableTextLoad={
|
||||
"next","hold",
|
||||
"pause","finish",
|
||||
"win","finish","lose","pause",
|
||||
"custom",
|
||||
"setting_game",
|
||||
"setting_graphic",
|
||||
@@ -95,7 +94,7 @@ function swapLanguage(l)
|
||||
royaleCtrlPad=gc.newCanvas(300,100)
|
||||
gc.setCanvas(royaleCtrlPad)
|
||||
gc.setColor(1,1,1)
|
||||
setFont(25)
|
||||
setFont(20)
|
||||
gc.setLineWidth(2)
|
||||
for i=1,4 do
|
||||
gc.rectangle("line",RCPB[2*i-1],RCPB[2*i],90,35,8,4)
|
||||
@@ -133,91 +132,6 @@ function restoreVirtualKey()
|
||||
end
|
||||
|
||||
|
||||
local vibrateLevel={0,.015,.02,.03,.04,.05,.06,.07,.08,.09}
|
||||
function VIB(t)
|
||||
if setting.vib>0 then
|
||||
love.system.vibrate(vibrateLevel[setting.vib+t])
|
||||
end
|
||||
end
|
||||
function SFX(s,v,pos)
|
||||
if setting.sfx>0 then
|
||||
local S=sfx[s]--AU_Queue
|
||||
local n=1
|
||||
while S[n]:isPlaying()do
|
||||
n=n+1
|
||||
if not S[n]then
|
||||
S[n]=S[n-1]:clone()
|
||||
S[n]:seek(0)
|
||||
break
|
||||
end
|
||||
end
|
||||
S=S[n]--AU_SRC
|
||||
if S:getChannelCount()==1 then
|
||||
if pos then
|
||||
pos=pos*setting.stereo*.1
|
||||
S:setPosition(pos,1-pos^2,0)
|
||||
else
|
||||
S:setPosition(0,0,0)
|
||||
end
|
||||
end
|
||||
S:setVolume((v or 1)*setting.sfx*.1)
|
||||
print((v or 1)*setting.sfx*.1)
|
||||
S:play()
|
||||
end
|
||||
end
|
||||
function getFreeVoiceChannel()
|
||||
local i=#voiceQueue
|
||||
for i=1,i do
|
||||
if #voiceQueue[i]==0 then return i end
|
||||
end
|
||||
voiceQueue[i+1]={}
|
||||
return i+1
|
||||
end
|
||||
function VOICE(s,chn)
|
||||
if setting.voc>0 then
|
||||
if chn then
|
||||
voiceQueue[chn][#voiceQueue[chn]+1]=voiceList[s][rnd(#voiceList[s])]
|
||||
--添加到[chn]
|
||||
else
|
||||
voiceQueue[getFreeVoiceChannel()]={voiceList[s][rnd(#voiceList[s])]}
|
||||
--自动查找/创建空轨
|
||||
end
|
||||
end
|
||||
end
|
||||
function BGM(s)
|
||||
if setting.bgm>0 then
|
||||
if bgmPlaying~=s then
|
||||
if bgmPlaying then newTask(Event_task.bgmFadeOut,nil,bgmPlaying)end
|
||||
for i=#Task,1,-1 do
|
||||
local T=Task[i]
|
||||
if T.code==Event_task.bgmFadeIn then
|
||||
T.code=Event_task.bgmFadeOut
|
||||
elseif T.code==Event_task.bgmFadeOut and T.data==s then
|
||||
rem(Task,i)
|
||||
end
|
||||
end
|
||||
if s then
|
||||
newTask(Event_task.bgmFadeIn,nil,s)
|
||||
bgm[s]:play()
|
||||
end
|
||||
bgmPlaying=s
|
||||
else
|
||||
if bgmPlaying then
|
||||
local v=setting.bgm*.1
|
||||
bgm[bgmPlaying]:setVolume(v)
|
||||
if v>0 then
|
||||
bgm[bgmPlaying]:play()
|
||||
else
|
||||
bgm[bgmPlaying]:pause()
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif bgmPlaying then
|
||||
bgm[bgmPlaying]:pause()
|
||||
bgmPlaying=nil
|
||||
end
|
||||
end
|
||||
|
||||
function updateStat()
|
||||
local S=players[1].stat
|
||||
for k,v in next,S do
|
||||
@@ -265,9 +179,7 @@ end
|
||||
function royaleLevelup()
|
||||
gameStage=gameStage+1
|
||||
local spd
|
||||
if(gameStage==3 or gameStage>4)and players[1].alive then
|
||||
players[1]:showText(text.royale_remain(#players.alive),"beat",50,-100,.3)
|
||||
end
|
||||
TEXT(text.royale_remain(#players.alive),640,200,40,"beat",.3)
|
||||
if gameStage==2 then
|
||||
spd=30
|
||||
elseif gameStage==3 then
|
||||
@@ -301,15 +213,16 @@ function royaleLevelup()
|
||||
end
|
||||
|
||||
function pauseGame()
|
||||
restartCount=0--Avoid strange darkness
|
||||
pauseTimer=0--Pause timer for animation
|
||||
if not gamefinished then
|
||||
if not gameResult then
|
||||
pauseCount=pauseCount+1
|
||||
end
|
||||
for i=1,#players.alive do
|
||||
local l=players.alive[i].keyPressing
|
||||
for i=1,#players do
|
||||
local l=players[i].keyPressing
|
||||
for j=1,#l do
|
||||
if l[j]then
|
||||
players.alive[i]:releaseKey(j)
|
||||
players[i]:releaseKey(j)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -325,14 +238,16 @@ function loadGame(mode,level)
|
||||
lv=level,
|
||||
}
|
||||
drawableText.modeName:set(text.modeName[mode])
|
||||
drawableText.levelName:set(modes[modeID[modeSel]].level[levelSel])
|
||||
drawableText.levelName:set(modes[modeID[mode]].level[level])
|
||||
needResetGameData=true
|
||||
scene.swapTo("play","deck")
|
||||
end
|
||||
function resetPartGameData()
|
||||
gameResult=false
|
||||
frame=30
|
||||
destroyPlayers()
|
||||
modes[curMode.id].load()
|
||||
texts={}
|
||||
if modeEnv.task then
|
||||
for i=1,#players do
|
||||
newTask(Event_task[modeEnv.task],players[i])
|
||||
@@ -347,7 +262,7 @@ function resetPartGameData()
|
||||
collectgarbage()
|
||||
end
|
||||
function resetGameData()
|
||||
gamefinished=false
|
||||
gameResult=false
|
||||
frame=0
|
||||
garbageSpeed=1
|
||||
pushSpeed=3
|
||||
@@ -365,6 +280,7 @@ function resetGameData()
|
||||
curBG=modeEnv.bg
|
||||
BGM(modeEnv.bgm)
|
||||
|
||||
texts={}
|
||||
FX_badge={}
|
||||
FX_attack={}
|
||||
for _,v in next,PTC.dust do
|
||||
@@ -410,7 +326,6 @@ function gameStart()
|
||||
end
|
||||
|
||||
|
||||
|
||||
local dataOpt={
|
||||
"run","game","time",
|
||||
"extraPiece","extraRate",
|
||||
@@ -448,6 +363,7 @@ function saveData()
|
||||
t=concat(t,"\r\n")
|
||||
userData:open("w")
|
||||
userData:write(t)
|
||||
userData:flush()
|
||||
userData:close()
|
||||
end
|
||||
|
||||
@@ -489,11 +405,19 @@ function loadSetting()
|
||||
v=toN(v)if not v or v<0 then v=0 end
|
||||
setting[t]=int(v)
|
||||
elseif t=="dropFX"or t=="shakeFX"or t=="atkFX"then
|
||||
setting[t]=toN(v:match("[0123]"))or 0
|
||||
setting[t]=toN(v:match("[012345]"))or 0
|
||||
elseif t=="lang"then
|
||||
setting[t]=toN(v:match("[123]"))or 1
|
||||
elseif t=="skin"then
|
||||
setting[t]=toN(v:match("[12345678]"))or 1
|
||||
elseif t=="modesel"then
|
||||
local t=toN(v)
|
||||
if not(t or modes[modeID[t]])then
|
||||
t=1
|
||||
end
|
||||
modeSel=t
|
||||
elseif t=="levelsel"then
|
||||
levelSel=toN(v)
|
||||
elseif t=="keymap"then
|
||||
v=splitS(v,"/")
|
||||
for i=1,16 do
|
||||
@@ -516,6 +440,9 @@ function loadSetting()
|
||||
end
|
||||
end
|
||||
end
|
||||
if not modes[modeID[modeSel]].level[levelSel]then
|
||||
levelSel=1
|
||||
end
|
||||
end
|
||||
local saveOpt={
|
||||
"das","arr",
|
||||
@@ -540,7 +467,7 @@ local saveOpt={
|
||||
"sfx","bgm",
|
||||
"vib","voc",
|
||||
"stereo",
|
||||
|
||||
|
||||
"VKSwitch",
|
||||
"VKTrack",
|
||||
"VKDodge",
|
||||
@@ -565,6 +492,8 @@ function saveSetting()
|
||||
map[i]=concat(setting.keyMap[i],",")
|
||||
end
|
||||
local t={
|
||||
"modesel="..modeSel,
|
||||
"levelsel="..levelSel,
|
||||
"keymap="..toS(concat(map,"/")),
|
||||
"VK="..toS(concat(vk,"/")),
|
||||
}
|
||||
@@ -574,5 +503,6 @@ function saveSetting()
|
||||
t=concat(t,"\r\n")
|
||||
userSetting:open("w")
|
||||
userSetting:write(t)
|
||||
userSetting:flush(t)
|
||||
userSetting:close()
|
||||
end
|
||||
@@ -1,8 +1,12 @@
|
||||
local S=[=[
|
||||
Patron(rmb10+):
|
||||
gggf/T080/Ykzl/zxc
|
||||
[D*a]?
|
||||
|
||||
Fireboos
|
||||
gggf
|
||||
Sasoric
|
||||
T080
|
||||
Ykzl
|
||||
zxc
|
||||
?[D*a]
|
||||
Future outlook:
|
||||
Normal:
|
||||
powerinfo switch
|
||||
@@ -23,6 +27,22 @@ Future outlook:
|
||||
infinite 1v1
|
||||
square mode
|
||||
more FXs & 3d features & animations
|
||||
0.8.2+:
|
||||
GUI adjusted
|
||||
added a cute cat
|
||||
0.8.2:
|
||||
new widget appearence
|
||||
GUI adjusted
|
||||
bug fixed
|
||||
0.8.1:
|
||||
more FX level
|
||||
better battery info displaying
|
||||
3 next in GMroll
|
||||
bug fixed
|
||||
0.8.0:
|
||||
remake text system
|
||||
more details
|
||||
bug fixed
|
||||
0.7.35:
|
||||
bug fixed
|
||||
0.7.34:
|
||||
|
||||