summaryrefslogtreecommitdiff
path: root/game/states
diff options
context:
space:
mode:
authorJustin Worthe <justin.worthe@gmail.com>2014-09-08 14:45:23 +0200
committerJustin Worthe <justin.worthe@gmail.com>2014-09-08 14:45:23 +0200
commit8932998cc4282039152ae8233b5fd5026ed47323 (patch)
treea86e4ece25be25d27f16cec9b49bddcb57b3047b /game/states
parent8861d7911462469c8ffbbcd9c8a7f56e63c83ab4 (diff)
Added keyboard controls to HUD
Diffstat (limited to 'game/states')
-rw-r--r--game/states/play.js4
-rw-r--r--game/states/preload.js2
2 files changed, 4 insertions, 2 deletions
diff --git a/game/states/play.js b/game/states/play.js
index 9c5a91c..b866370 100644
--- a/game/states/play.js
+++ b/game/states/play.js
@@ -23,8 +23,8 @@ Play.prototype = {
this.gameWon = false;
- this.hudA = new Hud(this.game, this.playerA, this.gameWidth-0.5, -0.5, 'spaced-scorefont-a');
- this.hudB = new Hud(this.game, this.playerB, -8.5, -0.5, 'spaced-scorefont-b');
+ this.hudA = new Hud(this.game, this.playerA, this.gameWidth-0.5, -0.5, 'spaced-scorefont-a', 'keys-a');
+ this.hudB = new Hud(this.game, this.playerB, -8.5, -0.5, 'spaced-scorefont-b', 'keys-b');
//this.game.add.existing(this.hudA);
//this.game.add.existing(this.hudB);
diff --git a/game/states/preload.js b/game/states/preload.js
index f47b62d..95ceb96 100644
--- a/game/states/preload.js
+++ b/game/states/preload.js
@@ -33,6 +33,8 @@ Preload.prototype = {
this.load.image('hud-bg', 'assets/images/hud-bg.svg');
this.load.image('controller-diagram', 'assets/images/controller-diagram.svg');
+ this.load.image('keys-a', 'assets/images/keyboard-control-a.svg');
+ this.load.image('keys-b', 'assets/images/keyboard-control-b.svg');
},
create: function() {
this.asset.cropEnabled = false;