Make Phaser.Text play nicely with scrolling, by using an explicit x, y

This commit is contained in:
Cameron Foale
2013-09-19 16:57:19 +10:00
parent 4f969901da
commit 6fde862f61
+2 -25
View File
@@ -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;
}
});