Added Game Update loop step debugging - has proved utterly invaluable! Resolved camera jitter issues, gravity / downward force on tile/boundary issues and most tilemap collision issues.

This commit is contained in:
photonstorm
2014-01-31 02:06:45 +00:00
parent 651858372c
commit 6e4e99f436
11 changed files with 369 additions and 334 deletions
+5 -4
View File
@@ -284,7 +284,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
}
this.pendingStep = false;
this.stepping = true;
this.stepping = false;
this.stepCount = 0;
return this;
@@ -599,9 +599,9 @@ Phaser.Game.prototype = {
this.input.update();
this.tweens.update();
this.sound.update();
console.log('state update');
// console.log('state update');
this.state.update();
console.log('world update');
// console.log('world update');
this.world.update();
this.particles.update();
this.plugins.update();
@@ -635,7 +635,8 @@ Phaser.Game.prototype = {
this.pendingStep = false;
this.stepCount++;
console.log('--------- Game step', this.stepCount);
console.log('');
console.log('----------------------------- Game step', this.stepCount);
},
+3
View File
@@ -143,6 +143,9 @@ Phaser.World.prototype.postUpdate = function () {
}
while (currentNode != this.game.stage._stage.last._iNext)
}
this.camera.update();
}
/**