Dont't have time for that
This commit is contained in:
parent
15cf78bf74
commit
a30f95c8fa
2 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue