Fixed bug where children of Groups wouldn't have their preUpdate methods called.

This commit is contained in:
Richard Davey
2013-08-09 20:03:36 +01:00
parent 0b1bcaf270
commit aff7d99a8a
6 changed files with 37 additions and 10 deletions
+9 -4
View File
@@ -15085,6 +15085,10 @@ var Phaser;
* Pre-update is called right before update() on each object in the game loop.
*/
Sprite.prototype.preUpdate = function () {
if (this.name == 'piece1') {
console.log('wv', this.worldView);
}
this.transform.update();
if (this.transform.scrollFactor.x != 1 && this.transform.scrollFactor.x != 0) {
@@ -18110,6 +18114,11 @@ var Phaser;
Phaser.DebugUtils.line('bottom: ' + sprite.worldView.bottom + ' right: ' + sprite.worldView.right.toFixed(1));
};
DebugUtils.renderSpriteWorldViewBounds = function (sprite, color) {
if (typeof color === "undefined") { color = 'rgba(0,255,0,0.3)'; }
Phaser.DebugUtils.renderRectangle(sprite.worldView, color);
};
DebugUtils.renderSpriteInfo = /**
* Render debug infos. (including name, bounds info, position and some other properties)
* @param x {number} X position of the debug info to be rendered.
@@ -19789,10 +19798,6 @@ var Phaser;
}
};
Game.prototype.emptyCallback = function () {
// Called by onUpdateCallback etc
};
/**
* Game loop method will be called when it's running.
*/