diff --git a/src/gameobjects/Text.js b/src/gameobjects/Text.js index b919dffa..8c195b2f 100644 --- a/src/gameobjects/Text.js +++ b/src/gameobjects/Text.js @@ -21,8 +21,8 @@ Phaser.Text = function (game, x, y, text, style) { this.type = Phaser.TEXT; - this.position.x = x; - this.position.y = y; + this.position.x = this.x = x; + this.position.y = this.y = y; // Replaces the PIXI.Point with a slightly more flexible one this.anchor = new Phaser.Point(); @@ -91,26 +91,3 @@ Object.defineProperty(Phaser.Text.prototype, 'angle', { }); -Object.defineProperty(Phaser.Text.prototype, 'x', { - - get: function() { - return this.position.x; - }, - - set: function(value) { - this.position.x = value; - } - -}); - -Object.defineProperty(Phaser.Text.prototype, 'y', { - - get: function() { - return this.position.y; - }, - - set: function(value) { - this.position.y = value; - } - -});