Removed: Debug.renderSpriteTouching, Debug.renderLocalTransformInfo, Debug.renderWorldTransformInfo, Debug.renderSpriteCollision and Debug.dumpLinkedList.

Debug.renderPhysicsBody(body, color) is extremely useful for debugging the new physics bodies. Will draw the outline + points in the color given.
Debug.renderBodyInfo(sprite, x, y, color) will display lots of Sprite body data.
This commit is contained in:
photonstorm
2014-01-31 05:42:20 +00:00
parent 13a86765cb
commit 45b6d5a741
10 changed files with 183 additions and 510 deletions
-14
View File
@@ -373,13 +373,10 @@ Phaser.Sprite = function (game, x, y, key, frame) {
this.updateCache();
this.updateBounds();
this.debug = false;
/**
* @property {PIXI.Point} pivot - The pivot point of the displayObject that it rotates around.
*/
};
// Needed to keep the PIXI.Sprite constructor in the prototype chain (as the core pixi renderer uses an instanceof check sadly)
@@ -394,11 +391,6 @@ Phaser.Sprite.prototype.constructor = Phaser.Sprite;
*/
Phaser.Sprite.prototype.preUpdate = function() {
if (this.debug)
{
console.log('Sprite preUpdate xy: ', this.x, this.y, 'wxy:', this.world.x, this.world.y);
}
if (!this.exists || (this.group && !this.group.exists))
{
this.renderOrderID = -1;
@@ -706,12 +698,6 @@ Phaser.Sprite.prototype.postUpdate = function() {
this.position.x = this._cache.x;
this.position.y = this._cache.y;
if (this.debug)
{
console.log('Sprite postUpdate xy: ', this.x, this.y, 'right:', this.right);
}
}
};