Brand new highly optimised QuadTree added, populated by the game loop and world ready to be queried as often as you want in your game loop, without creating hundreds of new QuadTrees each frame.

This commit is contained in:
Richard Davey
2013-09-04 03:48:15 +01:00
parent 2a353a0327
commit 3f3b6bfd35
8 changed files with 362 additions and 83 deletions
+2 -1
View File
@@ -376,19 +376,20 @@ Phaser.Game.prototype = {
this.time.update(time);
this.plugins.preUpdate();
this.physics.preUpdate();
this.input.update();
this.tweens.update();
this.sound.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.physics.postUpdate();
this.plugins.postRender();
-4
View File
@@ -53,7 +53,6 @@ Phaser.World.prototype = {
var displayObject = this._stage;
// once the display object hits this. we can break the loop
var testObject = displayObject.last._iNext;
displayObject = displayObject.first;
@@ -73,11 +72,8 @@ 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;