在倒计时阶段按一些按键会报错
This commit is contained in:
@@ -2510,19 +2510,21 @@ function player.act.insRight(P,auto)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function player.act.insDown(P)
|
function player.act.insDown(P)
|
||||||
if P.curY>P.imgY and P.cur then
|
if P.cur and P.curY>P.imgY then
|
||||||
if P.gameEnv.dropFX and P.gameEnv.block and P.curY-P.imgY-P.r>-1 then
|
if P.gameEnv.dropFX and P.gameEnv.block and P.curY-P.imgY-P.r>-1 then
|
||||||
P:creatDropFX(P.curX,P.curY-1,P.c,P.curY-P.imgY-P.r+1)
|
P:creatDropFX(P.curX,P.curY-1,P.c,P.curY-P.imgY-P.r+1)
|
||||||
end
|
end
|
||||||
if P.gameEnv.shakeFX then
|
if P.gameEnv.shakeFX then
|
||||||
P.fieldOff.vy=P.gameEnv.shakeFX*.5
|
P.fieldOff.vy=P.gameEnv.shakeFX*.5
|
||||||
end
|
end
|
||||||
P.curY,P.lockDelay,P.spinLast=P.imgY,P.gameEnv.lock,false
|
P.curY=P.imgY
|
||||||
|
P.lockDelay=P.gameEnv.lock
|
||||||
|
P.spinLast=false
|
||||||
P:freshBlock(true,true)
|
P:freshBlock(true,true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function player.act.down1(P)
|
function player.act.down1(P)
|
||||||
if P.curY>P.imgY and P.cur then
|
if P.cur and P.curY>P.imgY then
|
||||||
if P.gameEnv.moveFX and P.gameEnv.block then
|
if P.gameEnv.moveFX and P.gameEnv.block then
|
||||||
P:createMoveFX("down")
|
P:createMoveFX("down")
|
||||||
end
|
end
|
||||||
@@ -2532,27 +2534,25 @@ function player.act.down1(P)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function player.act.down4(P)
|
function player.act.down4(P)
|
||||||
for _=1,4 do
|
if P.cur and P.curY>P.imgY then
|
||||||
if P.curY>P.imgY and P.cur then
|
local y=max(P.cur-4,P.imgY)
|
||||||
P.curY=P.curY-1
|
if P.gameEnv.dropFX and P.gameEnv.block and P.curY-y-P.r>-1 then
|
||||||
P:freshBlock(true,true)
|
P:creatDropFX(P.curX,P.curY-1,P.c,P.curY-y-P.r+1)
|
||||||
P.spinLast=false
|
|
||||||
else
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
P.curY=y
|
||||||
|
P:freshBlock(true,true)
|
||||||
|
P.spinLast=false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function player.act.down10(P)
|
function player.act.down10(P)
|
||||||
if P.cur then
|
if P.cur and P.curY>P.imgY then
|
||||||
for _=1,10 do
|
local y=max(P.cur-10,P.imgY)
|
||||||
if P.curY>P.imgY then
|
if P.gameEnv.dropFX and P.gameEnv.block and P.curY-y-P.r>-1 then
|
||||||
P.curY=P.curY-1
|
P:creatDropFX(P.curX,P.curY-1,P.c,P.curY-y-P.r+1)
|
||||||
P:freshBlock(true,true)
|
|
||||||
P.spinLast=false
|
|
||||||
else
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
P.curY=y
|
||||||
|
P:freshBlock(true,true)
|
||||||
|
P.spinLast=false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function player.act.dropLeft(P)
|
function player.act.dropLeft(P)
|
||||||
|
|||||||
Reference in New Issue
Block a user