State swap example done and working.

This commit is contained in:
Richard Davey
2013-09-13 05:44:04 +01:00
parent fd0a071cb3
commit 7c6e6df91a
13 changed files with 282 additions and 11 deletions
+6 -1
View File
@@ -5,6 +5,9 @@ Phaser.Text = function (game, x, y, text, style) {
text = text || '';
style = style || '';
PIXI.Text.call(this, text, style);
/*
this.canvas = document.createElement("canvas");
this.context = this.canvas.getContext("2d");
@@ -21,10 +24,12 @@ Phaser.Text = function (game, x, y, text, style) {
this.updateText();
this.dirty = false;
*/
};
Phaser.Text.prototype = Phaser.Utils.extend(true, Phaser.Sprite.prototype, PIXI.Text.prototype);
// Phaser.Text.prototype = Phaser.Utils.extend(true, Phaser.Sprite.prototype, PIXI.Text.prototype);
Phaser.Text.prototype = Phaser.Utils.extend(true, PIXI.Text.prototype);
Phaser.Text.prototype.constructor = Phaser.Text;
// Add our own custom methods