Added Debug.renderSpriteBounds() back and wrapped Body.velocity and force in px2p calls.

This commit is contained in:
photonstorm
2014-02-21 15:34:15 +00:00
parent d7ababa398
commit 7ee0c20bb3
5 changed files with 30 additions and 10 deletions
+15
View File
@@ -350,6 +350,21 @@ Phaser.Utils.Debug.prototype = {
},
/**
* Renders the Sprites bounds. Note: This is really expensive as it has to calculate the bounds every time you call it!
* @method Phaser.Utils.Debug#renderSpriteBounds
* @param {Phaser.Sprite} sprite - Description.
* @param {string} [color] - Color of the debug info to be rendered (format is css color string).
* @param {boolean} [filled=true] - Render the rectangle as a fillRect (default, true) or a strokeRect (false)
*/
renderSpriteBounds: function (sprite, color, filled) {
var bounds = sprite.getBounds();
this.renderRectangle(bounds, color, filled);
},
/**
* Render debug infos (including name, bounds info, position and some other properties) about the Sprite.
* @method Phaser.Utils.Debug#renderSpriteInfo