summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Worthe <justin.worthe@entelect.co.za>2014-05-28 17:16:39 +0200
committerJustin Worthe <justin.worthe@entelect.co.za>2014-05-28 17:16:39 +0200
commit83d3c7bac60e8c838c4a779fde7d8ff6c8a7cc90 (patch)
tree45046cda16b4786b4943806455ff7a895a825cc8
parent46b8f845e0e8ef4534a99e2d34b604f990ac217b (diff)
Fixed centering of victory text
-rw-r--r--game/states/play.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/game/states/play.js b/game/states/play.js
index a68b068..104c322 100644
--- a/game/states/play.js
+++ b/game/states/play.js
@@ -47,8 +47,6 @@ Play.prototype = {
this.playerAScoreText = this.game.add.bitmapText(-0.1, -0.4, 'spaced-scorefont','0',1);
this.playerBScoreText = this.game.add.bitmapText(this.world.width/this.world.scale.x - 2.1, -0.4, 'spaced-scorefont','0',1);
- this.victoryText = this.game.add.bitmapText(this.world.width/2/this.world.scale.x, 2, 'scorefont', '', 1);
-
this.gameWon = false;
},
update: function() {
@@ -207,7 +205,7 @@ Play.prototype = {
console.log("Player " + this.playerTurn + "'s turn");
},
setVictoryText: function(newText) {
- this.victoryText.setText(newText);
+ this.victoryText = this.game.add.bitmapText(this.world.width/2/this.world.scale.x, 2, 'scorefont', newText, 1);
this.victoryText.position.x = this.world.width/2/this.world.scale.x - this.victoryText.textWidth/2 - 0.5;
},
shutdown: function() {