Forces working, collision half way there.

This commit is contained in:
Richard Davey
2013-09-03 17:28:12 +01:00
parent 2fe8a3a0a7
commit a27f6d6562
5 changed files with 322 additions and 5 deletions
+3 -2
View File
@@ -379,16 +379,17 @@ Phaser.Game.prototype = {
this.input.update();
this.tweens.update();
// this.stage.update();
this.sound.update();
// this.physics.update();
this.world.update();
this.state.update();
// this.physics.update();
this.plugins.update();
this.renderer.render(this.world._stage);
this.state.render();
this.world.postUpdate();
this.plugins.postRender();
},
+24
View File
@@ -71,6 +71,30 @@ Phaser.World.prototype = {
},
postUpdate: function () {
//this.camera.update();
var displayObject = this._stage;
// once the display object hits this. we can break the loop
var testObject = displayObject.last._iNext;
displayObject = displayObject.first;
do
{
if (displayObject['postUpdate'])
{
displayObject.postUpdate();
}
// count++
displayObject = displayObject._iNext;
}
while(displayObject != testObject)
},
/**
* Updates the size of this world.
*