mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 19:09:02 -06:00
Small DAS changes
This commit is contained in:
parent
0393396d74
commit
5590e6c89b
@ -100,6 +100,16 @@ function GameMode:update(inputs, ruleset)
|
|||||||
|
|
||||||
self:chargeDAS(inputs, self:getDasLimit(), self.getARR())
|
self:chargeDAS(inputs, self:getDasLimit(), self.getARR())
|
||||||
|
|
||||||
|
-- set attempt flags
|
||||||
|
if inputs["left"] or inputs["right"] then self:onAttemptPieceMove(self.piece) end
|
||||||
|
if
|
||||||
|
inputs["rotate_left"] or inputs["rotate_right"] or
|
||||||
|
inputs["rotate_left2"] or inputs["rotate_right2"] or
|
||||||
|
inputs["rotate_180"]
|
||||||
|
then
|
||||||
|
self:onAttemptPieceRotate(self.piece)
|
||||||
|
end
|
||||||
|
|
||||||
if self.piece == nil then
|
if self.piece == nil then
|
||||||
self:processDelays(inputs, ruleset)
|
self:processDelays(inputs, ruleset)
|
||||||
else
|
else
|
||||||
@ -200,6 +210,8 @@ end
|
|||||||
|
|
||||||
-- event functions
|
-- event functions
|
||||||
function GameMode:whilePieceActive() end
|
function GameMode:whilePieceActive() end
|
||||||
|
function GameMode:onAttemptPieceMove(piece) end
|
||||||
|
function GameMode:onAttemptPieceRotate(piece) end
|
||||||
function GameMode:onPieceLock(piece, cleared_row_count)
|
function GameMode:onPieceLock(piece, cleared_row_count)
|
||||||
playSE("lock")
|
playSE("lock")
|
||||||
end
|
end
|
||||||
@ -228,11 +240,17 @@ end
|
|||||||
function GameMode:startRightDAS()
|
function GameMode:startRightDAS()
|
||||||
self.move = "right"
|
self.move = "right"
|
||||||
self.das = { direction = "right", frames = 0 }
|
self.das = { direction = "right", frames = 0 }
|
||||||
|
if self:getDasLimit() == 0 then
|
||||||
|
self:continueDAS()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function GameMode:startLeftDAS()
|
function GameMode:startLeftDAS()
|
||||||
self.move = "left"
|
self.move = "left"
|
||||||
self.das = { direction = "left", frames = 0 }
|
self.das = { direction = "left", frames = 0 }
|
||||||
|
if self:getDasLimit() == 0 then
|
||||||
|
self:continueDAS()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function GameMode:continueDAS()
|
function GameMode:continueDAS()
|
||||||
|
Loading…
Reference in New Issue
Block a user