diff options
Diffstat (limited to 'game/states')
-rw-r--r-- | game/states/boot.js | 2 | ||||
-rw-r--r-- | game/states/gameover.js | 14 | ||||
-rw-r--r-- | game/states/load.js (renamed from game/states/preload.js) | 6 | ||||
-rw-r--r-- | game/states/menu.js | 14 | ||||
-rw-r--r-- | game/states/play.js | 5 |
5 files changed, 4 insertions, 37 deletions
diff --git a/game/states/boot.js b/game/states/boot.js index 80b7d4b..eade2ff 100644 --- a/game/states/boot.js +++ b/game/states/boot.js @@ -9,7 +9,7 @@ Boot.prototype = { }, create: function() { this.game.input.maxPointers = 1; - this.game.state.start('preload'); + this.game.state.start('load'); } }; diff --git a/game/states/gameover.js b/game/states/gameover.js deleted file mode 100644 index 7ffb7ed..0000000 --- a/game/states/gameover.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -function GameOver() {} - -GameOver.prototype = { - preload: function () { - }, - create: function () { - }, - update: function () { - } -}; - -module.exports = GameOver; diff --git a/game/states/preload.js b/game/states/load.js index 95ceb96..3ad43ef 100644 --- a/game/states/preload.js +++ b/game/states/load.js @@ -1,11 +1,11 @@ 'use strict'; -function Preload() { +function Load() { this.asset = null; this.ready = false; } -Preload.prototype = { +Load.prototype = { preload: function() { this.asset = this.add.sprite(this.width/2,this.height/2, 'preloader'); this.asset.anchor.setTo(0.5, 0.5); @@ -49,4 +49,4 @@ Preload.prototype = { } }; -module.exports = Preload; +module.exports = Load; diff --git a/game/states/menu.js b/game/states/menu.js deleted file mode 100644 index c5a609f..0000000 --- a/game/states/menu.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -function Menu() {} - -Menu.prototype = { - preload: function() { - }, - create: function() { - }, - update: function() { - } -}; - -module.exports = Menu; diff --git a/game/states/play.js b/game/states/play.js index 42d9a8f..5151438 100644 --- a/game/states/play.js +++ b/game/states/play.js @@ -257,11 +257,6 @@ Play.prototype = { this.game.input.gamepad.start(); - this.game.orientation.onLeft.add(this.moveActivePlayer.bind(this, -1, 0), this); - this.game.orientation.onRight.add(this.moveActivePlayer.bind(this, 1, 0), this); - this.game.orientation.onUp.add(this.moveActivePlayer.bind(this, 0, -1), this); - this.game.orientation.onDown.add(this.moveActivePlayer.bind(this, 0, 1), this); - this.game.input.keyboard.addKey(this.playerBControls.poison).onDown.add(this.togglePoisonPill.bind(this, this.playerB), this); this.game.input.keyboard.addKey(this.playerAControls.poison).onDown.add(this.togglePoisonPill.bind(this, this.playerA), this); |