Dont't have time for that

This commit is contained in:
KGrzeg 2021-10-18 00:44:37 +02:00
parent 15cf78bf74
commit a30f95c8fa
2 changed files with 2 additions and 2 deletions

View file

@ -61,7 +61,7 @@ export default class Asteroid extends Phaser.Physics.Arcade.Sprite {
if (bullet.active == false) return
me.scene.events.emit("asteroid:destroy")
me.destroy() // TODO: use objects pool
me.destroy()
bullet.setActive(false)
bullet.setVisible(false)
}

View file

@ -78,7 +78,7 @@ export default class Ship extends Phaser.Physics.Arcade.Sprite {
if (asteroid.age > Asteroid.unbornAge) {
this.life -= 1
this.scene.cameras.main.shake(100, 0.02)
asteroid.destroy() //TODO: use objects pool
asteroid.destroy()
this.scene.events.emit("ship:gothit")
}