New polygon collision object examples and Body scale fixes.

This commit is contained in:
photonstorm
2014-01-31 10:34:18 +00:00
parent 45b6d5a741
commit 27fc447928
28 changed files with 2080 additions and 1295 deletions
+7 -6
View File
@@ -370,6 +370,12 @@ Phaser.Sprite = function (game, x, y, key, frame) {
*/
this.cropEnabled = false;
/**
* @property {boolean} debug - Handy flag to use with Game.enableStep
* @default
*/
this.debug = false;
this.updateCache();
this.updateBounds();
@@ -600,12 +606,6 @@ Phaser.Sprite.prototype.updateBounds = function() {
this.renderable = this._cache.cameraVisible;
}
// Update our physics bounds
if (this.body)
{
this.body.updateScale(this._cache.scaleX, this._cache.scaleY);
}
};
/**
@@ -926,6 +926,7 @@ Phaser.Sprite.prototype.reset = function(x, y, health) {
this.x = x;
this.y = y;
this.world.setTo(x, y);
this.position.x = this.x;
this.position.y = this.y;
this.alive = true;