mirror of
https://github.com/wassname/phaser.git
synced 2026-08-15 12:45:11 +08:00
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:
+5
-4
@@ -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);
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -143,6 +143,9 @@ Phaser.World.prototype.postUpdate = function () {
|
||||
}
|
||||
while (currentNode != this.game.stage._stage.last._iNext)
|
||||
}
|
||||
|
||||
this.camera.update();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user