mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-24 14:06:16 -04:00
Automatic deploy 28996852
This commit is contained in:
parent
7b1305b581
commit
b458780558
5 changed files with 60 additions and 40 deletions
|
@ -789,7 +789,7 @@ function shouldPierceByColor(ballOrCoin, vhit, hhit, chit) {
|
|||
|
||||
function brickHitCheck(ballOrCoin, radius, isBall) {
|
||||
// Make ball/coin bonce, and return bricks that were hit
|
||||
const {x, y, previousx, previousy, hitSinceBounce} = ballOrCoin;
|
||||
const {x, y, previousx, previousy} = ballOrCoin;
|
||||
|
||||
const vhit = hitsSomething(previousx, y, radius);
|
||||
const hhit = hitsSomething(x, previousy, radius);
|
||||
|
@ -1348,8 +1348,10 @@ function explodeBrick(index, ball, isExplosion) {
|
|||
color, ...coord,
|
||||
previousx: coord.x,
|
||||
previousy: coord.y,
|
||||
vx: ball.vx * (0.5 + Math.random()),
|
||||
vy: ball.vy * (0.5 + Math.random()),
|
||||
|
||||
// Use previous speed because the ball has already bounced
|
||||
vx: ball.previousvx * (0.5 + Math.random()),
|
||||
vy: ball.previousvy * (0.5 + Math.random()),
|
||||
sx: 0,
|
||||
sy: 0,
|
||||
weight: 0.8 + Math.random() * 0.2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue