mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 17:29:03 -06:00
Add piece last rotated events
This commit is contained in:
parent
1234e78354
commit
bf19f49323
@ -201,9 +201,18 @@ function GameMode:update(inputs, ruleset)
|
|||||||
self:dasCut()
|
self:dasCut()
|
||||||
end
|
end
|
||||||
|
|
||||||
if (piece_dx ~= 0) then self:onPieceMove(self.piece, self.grid) end
|
if (piece_dx ~= 0) then
|
||||||
if (piece_drot ~= 0) then self:onPieceRotate(self.piece, self.grid) end
|
self.piece.last_rotated = false
|
||||||
if (piece_dy ~= 0) then self:onPieceDrop(self.piece, self.grid) end
|
self:onPieceMove(self.piece, self.grid, piece_dx)
|
||||||
|
end
|
||||||
|
if (piece_drot ~= 0) then
|
||||||
|
self.piece.last_rotated = true
|
||||||
|
self:onPieceRotate(self.piece, self.grid, piece_drot)
|
||||||
|
end
|
||||||
|
if (piece_dy ~= 0) then
|
||||||
|
self.piece.last_rotated = false
|
||||||
|
self:onPieceDrop(self.piece, self.grid, piece_dy)
|
||||||
|
end
|
||||||
|
|
||||||
if inputs["up"] == true and
|
if inputs["up"] == true and
|
||||||
self.piece:isDropBlocked(self.grid) and
|
self.piece:isDropBlocked(self.grid) and
|
||||||
@ -293,9 +302,9 @@ end
|
|||||||
function GameMode:whilePieceActive() end
|
function GameMode:whilePieceActive() end
|
||||||
function GameMode:onAttemptPieceMove(piece, grid) end
|
function GameMode:onAttemptPieceMove(piece, grid) end
|
||||||
function GameMode:onAttemptPieceRotate(piece, grid) end
|
function GameMode:onAttemptPieceRotate(piece, grid) end
|
||||||
function GameMode:onPieceMove(piece, grid) end
|
function GameMode:onPieceMove(piece, grid, dx) end
|
||||||
function GameMode:onPieceRotate(piece, grid) end
|
function GameMode:onPieceRotate(piece, grid, drot) end
|
||||||
function GameMode:onPieceDrop(piece, grid) end
|
function GameMode:onPieceDrop(piece, grid, dy) end
|
||||||
function GameMode:onPieceLock(piece, cleared_row_count)
|
function GameMode:onPieceLock(piece, cleared_row_count)
|
||||||
playSE("lock")
|
playSE("lock")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user