summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniliara-edu <nil.jimeno@estudiant.fjaverianas.com>2024-12-24 18:08:40 +0100
committerniliara-edu <nil.jimeno@estudiant.fjaverianas.com>2024-12-24 18:08:40 +0100
commitfe63ca3c64d2dd310268df7391ba6de5e9b7a2f2 (patch)
treedc1886c4b700f045c163482629b4a3e8f87c0966
parent25adfc618e77db9a5ee3b98ce0dab0be832efed0 (diff)
updated for chromium
-rw-r--r--scss/index.scss2
-rw-r--r--src/entities/game_over.js2
-rw-r--r--src/entities/hello_kitty_background.js5
-rw-r--r--style.css2
4 files changed, 6 insertions, 5 deletions
diff --git a/scss/index.scss b/scss/index.scss
index 42efed2..803793f 100644
--- a/scss/index.scss
+++ b/scss/index.scss
@@ -10,7 +10,7 @@ img {
}
.pixelated {
- image-rendering: crisp-edges;
+ image-rendering: pixelated;
}
.background {
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()
}
}
diff --git a/style.css b/style.css
index 28243df..24a09cf 100644
--- a/style.css
+++ b/style.css
@@ -8,7 +8,7 @@ img {
left: 0; }
.pixelated {
- image-rendering: crisp-edges; }
+ image-rendering: pixelated; }
.background {
width: 100%;