From 474a7253b6b67e2ed33936f6b633587d5d304b66 Mon Sep 17 00:00:00 2001 From: niliara-edu Date: Thu, 26 Dec 2024 14:24:53 +0100 Subject: hello kitty stage 1 and 2 done --- src/entities/boshy.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/entities/boshy.js') diff --git a/src/entities/boshy.js b/src/entities/boshy.js index 9a2b589..d2d723f 100644 --- a/src/entities/boshy.js +++ b/src/entities/boshy.js @@ -22,6 +22,7 @@ export class Boshy extends Entity { sprite: BOSHY.NORMAL, }) + /* play initial sound */ switch (currentScene) { case SCENES.PREQUEL: Engine.radio.playSound(BOSHY.SOUNDS.INTRO2) @@ -67,15 +68,18 @@ export class Boshy extends Entity { this.lastShot = Engine.frame /*(reset reload)*/ - let bullet_a_position = this.position.clone() - let bullet_b_position = this.position.clone() + /* it was supposed to shoot twice */ + // let bullet_a_position = this.position.clone() + // let bullet_b_position = this.position.clone() - bullet_a_position.x = bullet_a_position.x + 5 - bullet_b_position.x = bullet_b_position.x - 5 + // bullet_a_position.x = bullet_a_position.x + 5 + // bullet_b_position.x = bullet_b_position.x - 5 - new BoshyBullet(bullet_a_position) - new BoshyBullet(bullet_b_position) - // new BoshyBullet(this.position.clone()) + // new BoshyBullet(bullet_a_position) + // new BoshyBullet(bullet_b_position) + + /* but once again, we need to save resources */ + new BoshyBullet(this.position.clone()) Engine.radio.playSound(BOSHY.SOUNDS.SHOOT) } @@ -84,6 +88,7 @@ export class Boshy extends Entity { this.dead = true this.playDeathSounds() this.spawnBlood() + Engine.screen.shake() this.position.x = 0 this.position.y = Engine.screen.viewport.y @@ -104,7 +109,7 @@ export class Boshy extends Entity { spawnBlood() { for (let i = 0; i<20; i++) { - new Blood(this.position.clone().floor()) + new Blood(this.position.clone()) } } } -- cgit v1.2.3