Skip to content

Instantly share code, notes, and snippets.

@Srushtika
Created June 9, 2020 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Srushtika/9cf0a0ca43f9bc9410fb336fa789e4e3 to your computer and use it in GitHub Desktop.
Save Srushtika/9cf0a0ca43f9bc9410fb336fa789e4e3 to your computer and use it in GitHub Desktop.
Code snippet 28 - For multiplayer space invaders article
class Explosion extends Phaser.GameObjects.Sprite {
constructor(scene, x, y) {
super(scene, x, y, "explosion");
scene.add.existing(this);
this.play("explode");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment