Merge pull request #52 from cocoademon/master

Make Phaser.Text play nicely with scrolling, by using an explicit x, y
This commit is contained in:
Richard Davey
2013-09-19 05:26:22 -07:00
2 changed files with 3 additions and 26 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ Phaser.RenderTexture = function (game, key, width, height) {
this.width = width || 100;
this.height = height || 100;
this.indetityMatrix = PIXI.mat3.create();
this.identityMatrix = PIXI.mat3.create();
this.frame = new PIXI.Rectangle(0, 0, this.width, this.height);
+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;
}
});