mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-05-05 03:07:14 -04:00
wip
This commit is contained in:
parent
3d3e7805d6
commit
16911620c0
16 changed files with 55 additions and 95 deletions
|
@ -271,7 +271,10 @@ export function render(gameState: GameState) {
|
|||
ctx.globalAlpha = 1;
|
||||
ctx.globalCompositeOperation = "source-over";
|
||||
const lastExplosionDelay = gameState.levelTime - gameState.lastExplosion + 5;
|
||||
const shaked = lastExplosionDelay < 200 && !isOptionOn("basic");
|
||||
|
||||
const shaked = lastExplosionDelay < 200 && !isOptionOn("basic") &&
|
||||
// Otherwise, if you pause after an explosion, moving the mouses shakes the picture
|
||||
gameState.running;
|
||||
if (shaked) {
|
||||
const amplitude =
|
||||
((gameState.perks.bigger_explosions + 1) * 50) / lastExplosionDelay;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue