Graphics fixes and other changes

This commit is contained in:
Richard Davey
2013-09-22 22:55:34 +01:00
parent 02723d4774
commit 093bf8343d
4 changed files with 16 additions and 76 deletions
+1 -53
View File
@@ -8,38 +8,12 @@ Phaser.Graphics = function (game, x, y) {
};
Phaser.Graphics.prototype = Object.create( PIXI.Graphics.prototype );
Phaser.Graphics.prototype = Object.create(PIXI.Graphics.prototype);
Phaser.Graphics.prototype.constructor = Phaser.Graphics;
Phaser.Graphics.prototype = Phaser.Utils.extend(true, Phaser.Graphics.prototype, Phaser.Sprite.prototype);
// Add our own custom methods
/**
* Automatically called by World.update
*/
Phaser.Graphics.prototype.OLDupdate = function() {
// if (!this.exists)
// {
// return;
// }
// this._cache.dirty = false;
// this._cache.x = this.x - (this.game.world.camera.x * this.scrollFactor.x);
// this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y);
// if (this.position.x != this._cache.x || this.position.y != this._cache.y)
// {
// this.position.x = this._cache.x;
// this.position.y = this._cache.y;
// this._cache.dirty = true;
// }
}
/*
Object.defineProperty(Phaser.Graphics.prototype, 'angle', {
get: function() {
@@ -51,29 +25,3 @@ Object.defineProperty(Phaser.Graphics.prototype, 'angle', {
}
});
Object.defineProperty(Phaser.Graphics.prototype, 'x', {
get: function() {
return this.position.x;
},
set: function(value) {
this.position.x = value;
}
});
Object.defineProperty(Phaser.Graphics.prototype, 'y', {
get: function() {
return this.position.y;
},
set: function(value) {
this.position.y = value;
}
});
*/