From fe63ca3c64d2dd310268df7391ba6de5e9b7a2f2 Mon Sep 17 00:00:00 2001 From: niliara-edu Date: Tue, 24 Dec 2024 18:08:40 +0100 Subject: updated for chromium --- src/entities/game_over.js | 2 -- src/entities/hello_kitty_background.js | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/entities/game_over.js b/src/entities/game_over.js index fc35938..150fbc8 100644 --- a/src/entities/game_over.js +++ b/src/entities/game_over.js @@ -43,10 +43,8 @@ export class GameOver extends Entity { zoomAnimation() { if (this.zoomWaitTime > 0) { this.zoomWaitTime--; return; } - console.log("hi") if (this.zoomedIn) this.size.add(new Vector(-this.zoomGrowth, -this.zoomGrowth)) else this.size.add(new Vector(this.zoomGrowth, this.zoomGrowth)) - console.log(this.size) if ( this.size.x == this.initialSize || this.size.x == this.maxSize diff --git a/src/entities/hello_kitty_background.js b/src/entities/hello_kitty_background.js index 4d9a81f..70f0b9d 100644 --- a/src/entities/hello_kitty_background.js +++ b/src/entities/hello_kitty_background.js @@ -27,7 +27,8 @@ export class HelloKittyBackground extends Entity { update() { this.position.y += this.speed - if (this.stage == 0 && this.position.y > this.max_down) { + if (this.stage == 0) { + if (this.position.y < this.max_down) return let margin = this.position.y - this.max_down let newPos = new Vector( this.size.x / 2 - this.x_margin, @@ -36,6 +37,8 @@ export class HelloKittyBackground extends Entity { new HelloKittyBackground(newPos) this.stage++ + return } + if (Engine.screen.isOffLimits(this.position, this.size)) this.remove() } } -- cgit v1.2.3