mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-22 04:56:15 -04:00
Build 29044319
This commit is contained in:
parent
b0c7e8decd
commit
e3003f1c25
6 changed files with 9 additions and 13 deletions
|
@ -251,14 +251,11 @@ export function explosionAt(
|
|||
y: number,
|
||||
ball: Ball,
|
||||
) {
|
||||
|
||||
const size = 1 + gameState.perks.bigger_explosions;
|
||||
const size = 1 + gameState.perks.bigger_explosions;
|
||||
schedulGameSound(gameState, "explode", ball.x, 1);
|
||||
if(index!==-1){
|
||||
|
||||
if (index !== -1) {
|
||||
if (gameState.bricks[index] == "black") delete gameState.bricks[index];
|
||||
|
||||
|
||||
const col = index % gameState.gridSize;
|
||||
const row = Math.floor(index / gameState.gridSize);
|
||||
// Break bricks around
|
||||
|
@ -276,7 +273,6 @@ export function explosionAt(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// Blow nearby coins
|
||||
forEachLiveOne(gameState.coins, (c) => {
|
||||
|
@ -1001,7 +997,7 @@ export function gameStateTick(
|
|||
clamp(b.y - y, -limit, limit) +
|
||||
((Math.random() - 0.5) * limit) / 3;
|
||||
|
||||
let index = brickIndex(x, y);
|
||||
let index = brickIndex(x, y);
|
||||
explosionAt(gameState, index, x, y, a);
|
||||
}
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue