diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2014-09-08 14:45:23 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2014-09-08 14:45:23 +0200 |
commit | 8932998cc4282039152ae8233b5fd5026ed47323 (patch) | |
tree | a86e4ece25be25d27f16cec9b49bddcb57b3047b /game/prefabs/hud.js | |
parent | 8861d7911462469c8ffbbcd9c8a7f56e63c83ab4 (diff) |
Added keyboard controls to HUD
Diffstat (limited to 'game/prefabs/hud.js')
-rw-r--r-- | game/prefabs/hud.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/game/prefabs/hud.js b/game/prefabs/hud.js index 13f8f51..a7b39a0 100644 --- a/game/prefabs/hud.js +++ b/game/prefabs/hud.js @@ -1,6 +1,6 @@ 'use strict'; -var Hud = function(game, player, x, y, scorefontKey) { +var Hud = function(game, player, x, y, scorefontKey, keyboardSpriteKey) { Phaser.Group.call(this, game); this.x = x; this.y = y; @@ -22,7 +22,9 @@ var Hud = function(game, player, x, y, scorefontKey) { this.controllerDiagram.scale = {x: 0.5, y: 0.5}; this.add(this.controllerDiagram); - this.sendToBack(this.background); + this.keyboardControls = new Phaser.Sprite(this.game, 0, 600, keyboardSpriteKey); + this.keyboardControls.scale = {x: 0.5, y: 0.5}; + this.add(this.keyboardControls); this.currentScore = 0; }; |