move音效在方块因重力或旋转触地时也会播放,而不只是移动后

move音效名改为touch
This commit is contained in:
MrZ626
2021-11-07 01:41:29 +08:00
parent a5de06dedb
commit a45b6ad57e
11 changed files with 19 additions and 17 deletions

View File

@@ -435,7 +435,7 @@ end
function switch:press()
self.code()
if self.sound then
SFX.play('move')
SFX.play('touch')
end
end
function WIDGET.newSwitch(D)--name,x,y[,lim][,fText][,color][,font=30][,sound=true][,disp],code[,hideF][,hide]
@@ -1431,7 +1431,7 @@ function WIDGET.textinput(texts)
if W and W.type=='inputBox'then
if(not W.regex or texts:match(W.regex))and(not W.limit or #(WIDGET.sel.value..texts)<=W.limit)then
WIDGET.sel.value=WIDGET.sel.value..texts
SFX.play('move')
SFX.play('touch')
else
SFX.play('finesseError',.3)
end

View File

@@ -603,6 +603,12 @@ function Player:freshBlock(mode)--string mode: push/move/fresh/newBlock
end
end
end
--Play sound if touch ground
if mode=='move'and self.sound and self.curY==self.ghoY then
SFX.play('touch')
end
end
function Player:lock()
local CB=self.cur.bk
@@ -2110,6 +2116,8 @@ local function update_alive(P)
if P.ghoY~=P.curY then
P.dropDelay=ENV.drop
elseif P.sound then
SFX.play('touch')
end
else
P.lockDelay=P.lockDelay-1
@@ -2437,9 +2445,6 @@ function Player:act_moveLeft(auto)
self:createMoveFX('left')
self.curX=self.curX-1
self:freshBlock('move')
if self.sound and self.curY==self.ghoY then
SFX.play('move')
end
if not auto then
self.moving=0
end
@@ -2466,9 +2471,6 @@ function Player:act_moveRight(auto)
self:createMoveFX('right')
self.curX=self.curX+1
self:freshBlock('move')
if self.sound and self.curY==self.ghoY then
SFX.play('move')
end
if not auto then
self.moving=0
end

View File

@@ -124,7 +124,7 @@ local function tapBoard(x,y,key)
SFX.play('win')
return
end
SFX.play('move')
SFX.play('touch')
end
end
end

View File

@@ -313,7 +313,7 @@ function scene.keyDown(key,isRep)
TEXT.show(arrows[key],640,360,80,'beat',3)
move=move+1
if not autoPressing then
SFX.play('move')
SFX.play('touch')
end
end
end

View File

@@ -50,7 +50,7 @@ function scene.keyDown(key,isRep)
progress=progress+1
frameKeyCount=frameKeyCount+1
TEXT.show(key:upper(),rnd(320,960),rnd(100,240),90,'score',2.6)
SFX.play('move')
SFX.play('touch')
if progress==2 then
state=1
startTime=TIME()

View File

@@ -57,7 +57,7 @@ local function full(L)
end
local function place(X,x)
board[X][x]=round
SFX.play('move')
SFX.play('touch')
lastX,lastx=X,x
curX,curx=nil
placeTime=TIME()

View File

@@ -157,7 +157,7 @@ function scene.keyDown(key,isRep)
input=input..key
inputTime=1
check(tonumber(input))
SFX.play('move')
SFX.play('touch')
end
elseif key=="-"then
if #input<8 then

View File

@@ -211,7 +211,7 @@ function scene.update()
SFX.play('fail')
else
fallingTimer=fast and 4 or 5
SFX.play('move')
SFX.play('touch')
end
end
elseif fast and(

View File

@@ -42,7 +42,7 @@ pad={x=140,y=65,page=1,
{samp={tag='ready2',func=function()playReadySFX(2)end}},
{samp={tag='ready1',func=function()playReadySFX(1)end}},
{samp={tag='start',func=function()playReadySFX(0)end}},
{sfx='move'},{sfx='lock'},{sfx='drop'},{sfx='fall'},
{sfx='touch'},{sfx='lock'},{sfx='drop'},{sfx='fall'},
},
{
{sfx='hold'},{sfx='prehold'},
@@ -76,7 +76,7 @@ pad={x=140,y=65,page=1,
{samp={tag='ready2',func=function()playReadySFX(2)end}},
{samp={tag='ready1',func=function()playReadySFX(1)end}},
{samp={tag='start',func=function()playReadySFX(0)end}},
{sfx='move'},{sfx='lock'},{sfx='drop'},{sfx='fall'},
{sfx='touch'},{sfx='lock'},{sfx='drop'},{sfx='fall'},
},
{
{sfx='hold'},{sfx='prehold'},

View File

@@ -36,7 +36,7 @@ local function _toggleMod(M,back)
SFX.play('move',.6)
SFX.play('lock')
else
SFX.play('move')
SFX.play('touch')
SFX.play('lock',.6)
end
scene.widgetList.unranked.hide=scoreValid()