+
+ class GameOver extends Phaser.State {
+
+ create() {
+
+ this.game.add.text(this.game.world.width / 2, 0, "GAME\nOVER", { align: 'center', fill: 'white', font: 'Ubuntu Mono', fontSize: 160, fontWeight: 'bold' }).anchor.setTo(0.5, 0);
+ this.game.add.text(this.game.world.width / 2, this.game.world.height * 0.75, "Stay determined...", { align: 'center', fill: 'white', font: 'Ubuntu Mono', fontSize: 24, fontWeight: 'bold' }).anchor.setTo(0.5, 0);
+
+ }
+
+ update() {
+
+ if (this.game.input.keyboard.isDown(Phaser.Keyboard.SPACEBAR))
+ {
+ this.game.state.start('GamePlay');
+ }
+
+ }
+
+ }