From 83d3c7bac60e8c838c4a779fde7d8ff6c8a7cc90 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Wed, 28 May 2014 17:16:39 +0200 Subject: Fixed centering of victory text --- game/states/play.js | 4 +--- 1 file changed, 1 insertion(+), 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() { -- cgit v1.2.3