Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3155bc48ef |
86
class.lua
86
class.lua
@@ -31,7 +31,10 @@ function clearTask(opt)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local button={type="button"}
|
local button={
|
||||||
|
type="button",
|
||||||
|
ATV=0,--activating time(0~8)
|
||||||
|
}
|
||||||
function newButton(x,y,w,h,color,font,code,hide,N)
|
function newButton(x,y,w,h,color,font,code,hide,N)
|
||||||
local _={
|
local _={
|
||||||
x=x-w*.5,y=y-h*.5,
|
x=x-w*.5,y=y-h*.5,
|
||||||
@@ -44,11 +47,18 @@ function newButton(x,y,w,h,color,font,code,hide,N)
|
|||||||
}for k,v in next,button do _[k]=v end return _
|
}for k,v in next,button do _[k]=v end return _
|
||||||
end
|
end
|
||||||
function button:isAbove(x,y)
|
function button:isAbove(x,y)
|
||||||
return x>self.x and x<self.x+self.w and y>self.y and y<self.y+self.h
|
return x>self.x-self.ATV and x<self.x+self.w+2*self.ATV and y>self.y-self.ATV and y<self.y+self.h+2*self.ATV
|
||||||
end
|
end
|
||||||
function button:FX()
|
function button:FX()
|
||||||
sysFX[#sysFX+1]={0,0,10,self.x,self.y,self.w,self.h}
|
sysFX[#sysFX+1]={0,0,10,self.x-self.ATV,self.y-self.ATV,self.w+2*self.ATV,self.h+2*self.ATV}
|
||||||
--[0=ripple],timer,duration,x,y,w,h
|
--0[ripple],timer,duration,x,y,w,h
|
||||||
|
end
|
||||||
|
function button:update()
|
||||||
|
if widget_sel==self then
|
||||||
|
if self.ATV<8 then self.ATV=self.ATV+1 end
|
||||||
|
else
|
||||||
|
if self.ATV>0 then self.ATV=self.ATV-1 end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function button:draw()
|
function button:draw()
|
||||||
local x,y,w,h=self.x,self.y,self.w,self.h
|
local x,y,w,h=self.x,self.y,self.w,self.h
|
||||||
@@ -57,12 +67,12 @@ function button:draw()
|
|||||||
local sd=shader_glow
|
local sd=shader_glow
|
||||||
sd:send("X",x)sd:send("Y",y)sd:send("W",w)sd:send("H",h)
|
sd:send("X",x)sd:send("Y",y)sd:send("W",w)sd:send("H",h)
|
||||||
gc.setShader(sd)
|
gc.setShader(sd)
|
||||||
gc.rectangle("fill",x,y,w,h)
|
gc.rectangle("fill",x-self.ATV,y-self.ATV,w+2*self.ATV,h+2*self.ATV)
|
||||||
gc.setShader()
|
gc.setShader()
|
||||||
if self==widget_sel then
|
if self.ATV>0 then
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
gc.setColor(1,1,1,.8)
|
gc.setColor(1,1,1,self.ATV*.125)
|
||||||
gc.rectangle("line",x+2,y+2,w-4,h-4)
|
gc.rectangle("line",x-self.ATV+2,y-self.ATV+2,w+2*self.ATV-4,h+2*self.ATV-4)
|
||||||
end
|
end
|
||||||
local t=self.text
|
local t=self.text
|
||||||
if t then
|
if t then
|
||||||
@@ -82,7 +92,10 @@ function button:getInfo()
|
|||||||
print(format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font))
|
print(format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font))
|
||||||
end
|
end
|
||||||
|
|
||||||
local switch={type="switch"}
|
local switch={
|
||||||
|
type="switch",
|
||||||
|
ATV=0,--activating time(0~8)
|
||||||
|
}
|
||||||
function newSwitch(x,y,font,disp,code,hide,N)
|
function newSwitch(x,y,font,disp,code,hide,N)
|
||||||
local _={
|
local _={
|
||||||
x=x,y=y,font=font,
|
x=x,y=y,font=font,
|
||||||
@@ -95,21 +108,30 @@ end
|
|||||||
function switch:isAbove(x,y)
|
function switch:isAbove(x,y)
|
||||||
return x>self.x and x<self.x+50 and y>self.y-25 and y<self.y+25
|
return x>self.x and x<self.x+50 and y>self.y-25 and y<self.y+25
|
||||||
end
|
end
|
||||||
function switch:FX()
|
function switch:update()
|
||||||
sysFX[#sysFX+1]=self.disp()and
|
if widget_sel==self then
|
||||||
{1,0,15,.4,1,.4,self.x,self.y-25,50,50,0}--Switched on
|
if self.ATV<8 then self.ATV=self.ATV+1 end
|
||||||
or{1,0,15,1,.4,.4,self.x,self.y-25,50,50,0}--Switched off
|
else
|
||||||
--[1=square fade],timer,duration,r,g,b,x,y,w,h
|
if self.ATV>0 then self.ATV=self.ATV-1 end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function switch:draw()
|
function switch:draw()
|
||||||
local x,y=self.x,self.y-25
|
local x,y=self.x,self.y-25
|
||||||
if self.disp()then
|
if self.disp()then
|
||||||
|
if self.ATV>0 then
|
||||||
|
gc.setColor(1,.3,.3,self.ATV*.06)
|
||||||
|
gc.rectangle("fill",x,y,50,50)
|
||||||
|
end
|
||||||
gc.setColor(.9,1,.9)
|
gc.setColor(.9,1,.9)
|
||||||
gc.setLineWidth(6)
|
gc.setLineWidth(6)
|
||||||
gc.line(x+5,y+25,x+18,y+38,x+45,y+11)
|
gc.line(x+5,y+25,x+18,y+38,x+45,y+11)
|
||||||
end--checked
|
else
|
||||||
gc.setColor(1,1,1,self==widget_sel and .6 or .3)
|
if self.ATV>0 then
|
||||||
gc.rectangle("fill",x,y,50,50)
|
gc.setColor(.3,1,.3,self.ATV*.06)
|
||||||
|
gc.rectangle("fill",x,y,50,50)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--checked
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.rectangle("line",x,y,50,50)
|
gc.rectangle("line",x,y,50,50)
|
||||||
@@ -125,7 +147,11 @@ function switch:getInfo()
|
|||||||
print(format("x=%d,y=%d,font=%d",self.x,self.y,self.font))
|
print(format("x=%d,y=%d,font=%d",self.x,self.y,self.font))
|
||||||
end
|
end
|
||||||
|
|
||||||
local slider={type="slider"}
|
local slider={
|
||||||
|
type="slider",
|
||||||
|
ATV=0,--activating time(0~8)
|
||||||
|
pos=0,--position shown
|
||||||
|
}
|
||||||
function newSlider(x,y,w,unit,font,change,disp,code,hide,N)
|
function newSlider(x,y,w,unit,font,change,disp,code,hide,N)
|
||||||
local _={
|
local _={
|
||||||
x=x,y=y,
|
x=x,y=y,
|
||||||
@@ -141,13 +167,19 @@ end
|
|||||||
function slider:isAbove(x,y)
|
function slider:isAbove(x,y)
|
||||||
return x>self.x-10 and x<self.x+self.w+10 and y>self.y-20 and y<self.y+20
|
return x>self.x-10 and x<self.x+self.w+10 and y>self.y-20 and y<self.y+20
|
||||||
end
|
end
|
||||||
function slider:FX(pos)
|
function slider:update()
|
||||||
sysFX[#sysFX+1]={1,0,10,1,1,1,self.x+self.w*pos/self.unit-8,self.y-15,17,30}
|
if widget_sel==self then
|
||||||
--[1=square fade],timer,duration,r,g,b,x,y,w,h
|
if self.ATV<6 then self.ATV=self.ATV+1 end
|
||||||
|
else
|
||||||
|
if self.ATV>0 then self.ATV=self.ATV-1 end
|
||||||
|
end
|
||||||
|
if not(self.hide and self.hide())then
|
||||||
|
self.pos=self.pos*.8+self.disp()*.2
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function slider:draw()
|
function slider:draw()
|
||||||
local x,y=self.x,self.y
|
local x,y=self.x,self.y
|
||||||
gc.setColor(1,1,1,self==widget_sel and .7 or .5)
|
gc.setColor(1,1,1,.5+self.ATV*.06)
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
local x1,x2=x,x+self.w
|
local x1,x2=x,x+self.w
|
||||||
for p=0,self.unit do
|
for p=0,self.unit do
|
||||||
@@ -165,13 +197,13 @@ function slider:draw()
|
|||||||
gc.printf(t,x-312,y-self.font*.7,300,"right")
|
gc.printf(t,x-312,y-self.font*.7,300,"right")
|
||||||
end
|
end
|
||||||
--text
|
--text
|
||||||
local x,y=x1+(x2-x1)*self.disp()/self.unit-9,y-16
|
local x,y,w,h=x1+(x2-x1)*self.pos/self.unit-10-self.ATV,y-16-self.ATV,20+2*self.ATV,32+2*self.ATV
|
||||||
gc.setColor(.8,.8,.8)
|
gc.setColor(.8,.8,.8)
|
||||||
gc.rectangle("fill",x,y,19,32)
|
gc.rectangle("fill",x,y,w,h)
|
||||||
if self==widget_sel then
|
if self.ATV>0 then
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1,self.ATV*.16)
|
||||||
gc.rectangle("line",x+1,y+1,18,30)
|
gc.rectangle("line",x+1,y+1,w-2,h-2)
|
||||||
end
|
end
|
||||||
--block
|
--block
|
||||||
end
|
end
|
||||||
|
|||||||
2
conf.lua
2
conf.lua
@@ -1,4 +1,4 @@
|
|||||||
gameVersion="Alpha V0.8.3"
|
gameVersion="Alpha V0.8.4"
|
||||||
function love.conf(t)
|
function love.conf(t)
|
||||||
t.identity="Techmino"--Save directory name
|
t.identity="Techmino"--Save directory name
|
||||||
t.version="11.1"
|
t.version="11.1"
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ spin判定:
|
|||||||
攻击系统:
|
攻击系统:
|
||||||
消1/2/3/4攻击0/1/2/4
|
消1/2/3/4攻击0/1/2/4
|
||||||
spin1/2/3攻击2/4/6,若mini则减半
|
spin1/2/3攻击2/4/6,若mini则减半
|
||||||
b2b:增加1~2(tetris)/1~3(spin)攻击
|
B2B:增加1~2(techrash)/1~3(spin)攻击
|
||||||
b3b:满b2b效果+1额外抵挡
|
B3B:满B2B效果+1额外抵挡
|
||||||
PC:其它攻击与6~8(本局内递增)取高+2额外抵挡
|
PC:其它攻击与6~8(本局内递增)取高+2额外抵挡
|
||||||
连击:0,0,1,1,2,2,3,3,4,4,3……
|
连击:0,0,1,1,2,2,3,3,4,4,3……
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ back to back(B2B)点数说明:
|
|||||||
|
|
||||||
攻击延迟:
|
攻击延迟:
|
||||||
消2/3的攻击生效最快,消四其次,spin攻击生效较慢,高连击生效最慢
|
消2/3的攻击生效最快,消四其次,spin攻击生效较慢,高连击生效最慢
|
||||||
b2b或者b3b增加攻击力的同时也会减缓一点生效速度,mini大幅减缓生效速度
|
B2B或者B3B增加攻击力的同时也会减缓一点生效速度,mini大幅减缓生效速度
|
||||||
|
|
||||||
抵消逻辑:
|
抵消逻辑:
|
||||||
发动攻击时,若缓冲条有攻击则先用额外抵挡再用攻击力1:1抵消最先受到的攻击
|
发动攻击时,若缓冲条有攻击则先用额外抵挡再用攻击力1:1抵消最先受到的攻击
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ return{
|
|||||||
warning="禁 止 私 自 传 播",
|
warning="禁 止 私 自 传 播",
|
||||||
WidgetText={
|
WidgetText={
|
||||||
main={
|
main={
|
||||||
lang="Lang",
|
lang="言/A",
|
||||||
qplay="快速开始",
|
qplay="快速开始",
|
||||||
play="开始",
|
play="开始",
|
||||||
setting="设置",
|
setting="设置",
|
||||||
@@ -259,7 +259,8 @@ return{
|
|||||||
pause={
|
pause={
|
||||||
resume= "继续",
|
resume= "继续",
|
||||||
restart="重新开始",
|
restart="重新开始",
|
||||||
setting="设置",
|
sfx="音效",
|
||||||
|
bgm="音乐",
|
||||||
quit= "退出",
|
quit= "退出",
|
||||||
},
|
},
|
||||||
setting_game={
|
setting_game={
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ return{
|
|||||||
warning="禁 止 私 自 传 播",
|
warning="禁 止 私 自 传 播",
|
||||||
WidgetText={
|
WidgetText={
|
||||||
main={
|
main={
|
||||||
lang="Lang",
|
lang="言/A",
|
||||||
qplay="快速开始",
|
qplay="快速开始",
|
||||||
play="开始",
|
play="开始",
|
||||||
setting="设置",
|
setting="设置",
|
||||||
@@ -259,7 +259,8 @@ return{
|
|||||||
pause={
|
pause={
|
||||||
resume= "继续",
|
resume= "继续",
|
||||||
restart="重新开始",
|
restart="重新开始",
|
||||||
setting="设置",
|
sfx="音效",
|
||||||
|
bgm="音乐",
|
||||||
quit= "退出",
|
quit= "退出",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ Lib used:
|
|||||||
warning="DO NOT DISTRIBUTE",
|
warning="DO NOT DISTRIBUTE",
|
||||||
WidgetText={
|
WidgetText={
|
||||||
main={
|
main={
|
||||||
lang="Lang",
|
lang="言/A",
|
||||||
qplay="Qplay",
|
qplay="Qplay",
|
||||||
play="Play",
|
play="Play",
|
||||||
setting="Settings",
|
setting="Settings",
|
||||||
@@ -258,7 +258,8 @@ Lib used:
|
|||||||
pause={
|
pause={
|
||||||
resume="Resume",
|
resume="Resume",
|
||||||
restart="Restart",
|
restart="Restart",
|
||||||
setting="Setting",
|
sfx="SFX",
|
||||||
|
bgm="BGM",
|
||||||
quit="Quit",
|
quit="Quit",
|
||||||
},
|
},
|
||||||
setting_game={
|
setting_game={
|
||||||
|
|||||||
8
list.lua
8
list.lua
@@ -405,14 +405,12 @@ Widget={
|
|||||||
resetGameData()
|
resetGameData()
|
||||||
scene.swapTo("play","none")
|
scene.swapTo("play","none")
|
||||||
end),
|
end),
|
||||||
setting=newButton(1150,80,200,100,C.yellow,40,function()
|
sfx= newSlider(950,60,280,10,35,function()SFX("blip_1")end, SETdisp("sfx"),SETsto("sfx")),
|
||||||
scene.push()
|
bgm= newSlider(950,120,280,10,35,function()BGM(bgmPlaying or"blank")end, SETdisp("bgm"),SETsto("bgm")),
|
||||||
scene.swapTo("setting_sound")
|
|
||||||
end),
|
|
||||||
quit= newButton(640,600,240,100,C.white,45,scene.back),
|
quit= newButton(640,600,240,100,C.white,45,scene.back),
|
||||||
},
|
},
|
||||||
setting_game={
|
setting_game={
|
||||||
graphic=newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_graphic")end, nil,"sound"),
|
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"),
|
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()
|
dasD= newButton(180,230,50,50,C.white,40,function()
|
||||||
setting.das=(setting.das-1)%31
|
setting.das=(setting.das-1)%31
|
||||||
|
|||||||
135
main.lua
135
main.lua
@@ -583,7 +583,8 @@ function touchMove.play(id,x,y,dx,dy)
|
|||||||
end
|
end
|
||||||
function keyDown.play(key)
|
function keyDown.play(key)
|
||||||
if key=="escape"and not scene.swapping then
|
if key=="escape"and not scene.swapping then
|
||||||
return(frame<180 and back or pauseGame)()
|
(frame<180 and back or pauseGame)()
|
||||||
|
return
|
||||||
end
|
end
|
||||||
local m=setting.keyMap
|
local m=setting.keyMap
|
||||||
for p=1,players.human do
|
for p=1,players.human do
|
||||||
@@ -651,24 +652,21 @@ local function widgetPress(W,x,y)
|
|||||||
VOICE("nya")
|
VOICE("nya")
|
||||||
elseif W.type=="switch"then
|
elseif W.type=="switch"then
|
||||||
W.code()
|
W.code()
|
||||||
W:FX()
|
|
||||||
SFX("move",.6)
|
SFX("move",.6)
|
||||||
elseif W.type=="slider"then
|
elseif W.type=="slider"then
|
||||||
if not x then return end
|
if not x then return end
|
||||||
local p=W.disp()
|
local p,P=W.disp(),x<W.x and 0 or x>W.x+W.w and W.unit or int((x-W.x)*W.unit/W.w+.5)
|
||||||
W.code(x<W.x and 0 or x>W.x+W.w and W.unit or int((x-W.x)*W.unit/W.w+.5))
|
if p==P then return end
|
||||||
if p==W.disp()then return end
|
W.code(P)
|
||||||
W:FX(p)
|
|
||||||
if W.change then W.change()end
|
if W.change then W.change()end
|
||||||
end
|
end
|
||||||
if W.hide and W.hide()then widget_sel=nil end
|
if W.hide and W.hide()then widget_sel=nil end
|
||||||
end
|
end
|
||||||
local function widgetDrag(W,x,y,dx,dy)
|
local function widgetDrag(W,x,y,dx,dy)
|
||||||
if W.type=="slider"then
|
if W.type=="slider"then
|
||||||
local p=W.disp()
|
local p,P=W.disp(),x<W.x and 0 or x>W.x+W.w and W.unit or int((x-W.x)*W.unit/W.w+.5)
|
||||||
W.code(x<W.x and 0 or x>W.x+W.w and W.unit or int((x-W.x)*W.unit/W.w+.5))
|
if p==P then return end
|
||||||
if p==W.disp()then return end
|
W.code(P)
|
||||||
W:FX(p)
|
|
||||||
if W.change then W.change()end
|
if W.change then W.change()end
|
||||||
elseif not W:isAbove(x,y)then
|
elseif not W:isAbove(x,y)then
|
||||||
widget_sel=nil
|
widget_sel=nil
|
||||||
@@ -685,18 +683,14 @@ local function widgetControl_key(i)
|
|||||||
if not scene.swapping and widget_sel then
|
if not scene.swapping and widget_sel then
|
||||||
widgetPress(widget_sel)
|
widgetPress(widget_sel)
|
||||||
end
|
end
|
||||||
else
|
elseif i=="left"or i=="right"then
|
||||||
if widget_sel then
|
if widget_sel then
|
||||||
local W=widget_sel
|
local W=widget_sel
|
||||||
if W.type=="slider"then
|
if W.type=="slider"then
|
||||||
local p=W.disp()
|
local p=W.disp()
|
||||||
if i=="left"then
|
local P=i=="left"and(p>0 and p-1)or p<W.unit and p+1
|
||||||
if W.disp()>0 then W.code(W.disp()-1)end
|
if p==P or not P then return end
|
||||||
elseif i=="right"then
|
W.code(P)
|
||||||
if W.disp()<W.unit then W.code(W.disp()+1)end
|
|
||||||
end
|
|
||||||
if p==W.disp()then return end
|
|
||||||
W:FX(p)
|
|
||||||
if W.change then W.change()end
|
if W.change then W.change()end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -711,18 +705,19 @@ local function widgetControl_gamepad(i)
|
|||||||
end
|
end
|
||||||
elseif i=="start"then
|
elseif i=="start"then
|
||||||
if not scene.swapping and widget_sel then
|
if not scene.swapping and widget_sel then
|
||||||
|
if not scene.swapping and widget_sel then
|
||||||
|
widgetPress(widget_sel)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif i=="dpleft"or i=="dpright"then
|
||||||
|
if widget_sel then
|
||||||
local W=widget_sel
|
local W=widget_sel
|
||||||
if W.hide and W.hide()then widget_sel=nil end
|
if W.type=="slider"then
|
||||||
if W.type=="button"then
|
local p=W.disp()
|
||||||
W.code()
|
local P=i=="left"and(p>0 and p-1)or p<W.unit and p+1
|
||||||
W:FX()
|
if p==P or not P then return end
|
||||||
SFX("button")
|
W.code(P)
|
||||||
VOICE("nya")
|
if W.change then W.change()end
|
||||||
elseif W.type=="switch"then
|
|
||||||
W.code()
|
|
||||||
W:FX()
|
|
||||||
SFX("move",.6)
|
|
||||||
-- elseif W.type=="slider"then
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -957,44 +952,68 @@ function love.update(dt)
|
|||||||
scene.swapping=false
|
scene.swapping=false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if Tmr[scene.cur]then
|
local i=Tmr[scene.cur]
|
||||||
Tmr[scene.cur](dt)
|
if i then i(dt)end
|
||||||
end
|
|
||||||
for i=#Task,1,-1 do
|
for i=#Task,1,-1 do
|
||||||
local T=Task[i]
|
local T=Task[i]
|
||||||
if T.code(T.P,T.data)then
|
if T.code(T.P,T.data)then
|
||||||
rem(Task,i)
|
for i=i,#Task do
|
||||||
end
|
Task[i]=Task[i+1]
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
for i=1,#voiceQueue do
|
for i=#voiceQueue,1,-1 do
|
||||||
local Q=voiceQueue[i]
|
local Q=voiceQueue[i]
|
||||||
if #Q>0 then
|
if Q.s==0 then--闲置轨,自动删除多余
|
||||||
if type(Q[1])=="userdata"then
|
if i>3 then
|
||||||
if not Q[1]:isPlaying()then
|
local _=voiceQueue
|
||||||
for i=1,#Q do
|
for i=i,#_ do
|
||||||
Q[i]=Q[i+1]
|
_[i]=_[i+1]
|
||||||
end
|
|
||||||
end--放完了,pop出下一个
|
|
||||||
else
|
|
||||||
local n=1
|
|
||||||
local L=voiceBank[Q[1]]
|
|
||||||
while L[n]:isPlaying()do
|
|
||||||
n=n+1
|
|
||||||
if not L[n]then
|
|
||||||
L[n]=L[n-1]:clone()
|
|
||||||
L[n]:seek(0)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
Q[1]=L[n]
|
end
|
||||||
Q[1]:setVolume(setting.voc*.1)
|
elseif Q.s==1 then--等待转换
|
||||||
Q[1]:play()
|
Q[1]=getVoice(Q[1])
|
||||||
--load voice with string
|
Q[1]:setVolume(setting.voc*.1)
|
||||||
|
Q[1]:play()
|
||||||
|
Q.s=Q[2]and 2 or 4
|
||||||
|
elseif Q.s==2 then--播放1,等待2
|
||||||
|
if Q[1]:getDuration()-Q[1]:tell()<.08 then
|
||||||
|
Q[2]=getVoice(Q[2])
|
||||||
|
Q[2]:setVolume(setting.voc*.1)
|
||||||
|
Q[2]:play()
|
||||||
|
Q.s=3
|
||||||
|
end
|
||||||
|
elseif Q.s==3 then--12同时播放
|
||||||
|
if not Q[1]:isPlaying()then
|
||||||
|
for i=1,#Q do
|
||||||
|
Q[i]=Q[i+1]
|
||||||
|
end
|
||||||
|
Q.s=Q[2]and 2 or 4
|
||||||
|
end
|
||||||
|
elseif Q.s==4 then--最后播放
|
||||||
|
if not Q[1]:isPlaying()then
|
||||||
|
Q[1]=nil
|
||||||
|
Q.s=0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if #Q>0 then
|
||||||
|
if Q[1]:isPlaying()then
|
||||||
|
if Q[2]and type(Q[2])=="string"and Q[1]:getDuration()-Q[1]:tell()<.08 then
|
||||||
|
Q[2]=getVoice(Q[2])
|
||||||
|
end
|
||||||
|
--快放完了,播放下一个
|
||||||
|
else
|
||||||
|
for i=1,#Q do
|
||||||
|
Q[i]=Q[i+1]
|
||||||
|
end
|
||||||
|
--放完了,移除
|
||||||
|
end
|
||||||
|
else
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- for k,W in next,Widget[scene.cur]do
|
for k,W in next,Widget[scene.cur]do
|
||||||
-- end--更新控件
|
W:update()
|
||||||
|
end--更新控件
|
||||||
end
|
end
|
||||||
local scs={1,2,1,2,1,2,1,2,1,2,1.5,1.5,.5,2.5}
|
local scs={1,2,1,2,1,2,1,2,1,2,1.5,1.5,.5,2.5}
|
||||||
local FPS=love.timer.getFPS
|
local FPS=love.timer.getFPS
|
||||||
|
|||||||
@@ -1803,7 +1803,7 @@ function player.drop(P)--Place piece
|
|||||||
end
|
end
|
||||||
send=send+(renATK[P.combo]or 3)
|
send=send+(renATK[P.combo]or 3)
|
||||||
if #P.field==0 then
|
if #P.field==0 then
|
||||||
P:showText(text.PC,0,-80,60,"flicker")
|
P:showText(text.PC,0,-80,50,"flicker")
|
||||||
send=min(send,3)+min(6+P.stat.pc,10)
|
send=min(send,3)+min(6+P.stat.pc,10)
|
||||||
exblock=exblock+2
|
exblock=exblock+2
|
||||||
sendTime=sendTime+60
|
sendTime=sendTime+60
|
||||||
|
|||||||
27
sound.lua
27
sound.lua
@@ -31,22 +31,39 @@ function SFX(s,v,pos)
|
|||||||
S:play()
|
S:play()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
function getVoice(str)
|
||||||
|
local n=1
|
||||||
|
local L=voiceBank[str]
|
||||||
|
while L[n]:isPlaying()do
|
||||||
|
n=n+1
|
||||||
|
if not L[n]then
|
||||||
|
L[n]=L[n-1]:clone()
|
||||||
|
L[n]:seek(0)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return L[n]
|
||||||
|
--load voice with string
|
||||||
|
end
|
||||||
function getFreeVoiceChannel()
|
function getFreeVoiceChannel()
|
||||||
local i=#voiceQueue
|
local i=#voiceQueue
|
||||||
for i=1,i do
|
for i=1,i do
|
||||||
if #voiceQueue[i]==0 then return i end
|
if #voiceQueue[i]==0 then return i end
|
||||||
end
|
end
|
||||||
voiceQueue[i+1]={}
|
voiceQueue[i+1]={s=0}
|
||||||
return i+1
|
return i+1
|
||||||
end
|
end
|
||||||
function VOICE(s,chn)
|
function VOICE(s,chn)
|
||||||
if setting.voc>0 then
|
if setting.voc>0 then
|
||||||
if chn then
|
if chn then
|
||||||
voiceQueue[chn][#voiceQueue[chn]+1]=voiceList[s][rnd(#voiceList[s])]
|
local L=voiceQueue[chn]
|
||||||
--添加到[chn]
|
local _=voiceList[s]
|
||||||
|
L[#L+1]=_[rnd(#_)]
|
||||||
|
L.s=1
|
||||||
|
--添加到queue[chn]
|
||||||
else
|
else
|
||||||
voiceQueue[getFreeVoiceChannel()]={voiceList[s][rnd(#voiceList[s])]}
|
voiceQueue[getFreeVoiceChannel()]={s=1,voiceList[s][rnd(#voiceList[s])]}
|
||||||
--自动查找/创建空轨
|
--自动创建空轨/播放
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,18 +8,19 @@ Patron(rmb10+):
|
|||||||
zxc
|
zxc
|
||||||
?[D*a]
|
?[D*a]
|
||||||
Future outlook:
|
Future outlook:
|
||||||
|
New mode system with:
|
||||||
|
ultra mode
|
||||||
|
rythem mode
|
||||||
|
combo mode
|
||||||
|
bigbang mode
|
||||||
|
TTT mode
|
||||||
Normal:
|
Normal:
|
||||||
timing mode
|
|
||||||
powerinfo switch
|
powerinfo switch
|
||||||
splashing block
|
splashing block
|
||||||
ajustable next count
|
ajustable next count
|
||||||
custom block color/direction
|
custom block color/direction
|
||||||
new mode system
|
|
||||||
combo mode
|
|
||||||
bigbang mode
|
|
||||||
TTT mode
|
|
||||||
custom block sequence
|
custom block sequence
|
||||||
CC smarter(think of gaebage buffer)
|
CC smarter(think of garbage buffer)
|
||||||
game recording
|
game recording
|
||||||
new AI:task-Z
|
new AI:task-Z
|
||||||
auto GUI in any screen size
|
auto GUI in any screen size
|
||||||
@@ -28,6 +29,11 @@ Future outlook:
|
|||||||
infinite 1v1
|
infinite 1v1
|
||||||
square mode
|
square mode
|
||||||
more FXs & 3d features & animations
|
more FXs & 3d features & animations
|
||||||
|
0.8.4:
|
||||||
|
better widget performence
|
||||||
|
vocal more natural(important,may cause new bug)
|
||||||
|
a bit better performence on mobile devices
|
||||||
|
fatal bug fixed
|
||||||
0.8.3:
|
0.8.3:
|
||||||
new widget appearence
|
new widget appearence
|
||||||
cuter miya
|
cuter miya
|
||||||
|
|||||||
Reference in New Issue
Block a user