summaryrefslogtreecommitdiff
path: root/src/entities/boshy.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/entities/boshy.js')
-rw-r--r--src/entities/boshy.js21
1 files changed, 13 insertions, 8 deletions
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())
}
}
}