Updated world so the update run uses the linked list. Sprite.getLocalPosition now almost working, but falls over for children.

This commit is contained in:
Richard Davey
2013-09-01 03:57:24 +01:00
parent 188d6239a3
commit 801c2af9d4
4 changed files with 50 additions and 33 deletions
+21 -2
View File
@@ -51,10 +51,29 @@ Phaser.World.prototype = {
this.camera.update();
for (var child in this._container.children)
var displayObject = this._stage;
// once the display object hits this. we can break the loop
var testObject = displayObject.last._iNext;
displayObject = displayObject.first;
do
{
this._container.children[child].update();
if (!displayObject.visible)
{
displayObject = displayObject.last._iNext;
continue;
}
if (displayObject['update'])
{
displayObject.update();
}
// count++
displayObject = displayObject._iNext;
}
while(displayObject != testObject)
},