mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
examples/blocks: Remove redundant code
This commit is contained in:
parent
295e3c0a0a
commit
971b42856a
@ -299,14 +299,12 @@ func (s *GameScene) Update(state *GameState) error {
|
|||||||
|
|
||||||
// Drop the current piece with gravity.
|
// Drop the current piece with gravity.
|
||||||
if !s.field.Flushing() {
|
if !s.field.Flushing() {
|
||||||
y := s.currentPieceY
|
|
||||||
angle := s.currentPieceAngle
|
angle := s.currentPieceAngle
|
||||||
s.currentPieceYCarry += 2*s.level() + 1
|
s.currentPieceYCarry += 2*s.level() + 1
|
||||||
const maxCarry = 60
|
const maxCarry = 60
|
||||||
for maxCarry <= s.currentPieceYCarry {
|
for maxCarry <= s.currentPieceYCarry {
|
||||||
s.currentPieceYCarry -= maxCarry
|
s.currentPieceYCarry -= maxCarry
|
||||||
s.currentPieceY = s.field.DropPiece(piece, s.currentPieceX, s.currentPieceY, angle)
|
s.currentPieceY = s.field.DropPiece(piece, s.currentPieceX, s.currentPieceY, angle)
|
||||||
moved = y != s.currentPieceY
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user