mirror of
https://github.com/wassname/phaser.git
synced 2026-09-17 12:30:22 +08:00
Added Game core loop stepping support. Super-useful for debugging, and helped me track down the issue with jittery physics collision. Double-win!
This commit is contained in:
+8
-9
@@ -156,22 +156,21 @@ Phaser.World.prototype.postUpdate = function () {
|
||||
*/
|
||||
Phaser.World.prototype.setBounds = function (x, y, width, height) {
|
||||
|
||||
if (width < this.game.width)
|
||||
{
|
||||
width = this.game.width;
|
||||
}
|
||||
if (width < this.game.width)
|
||||
{
|
||||
width = this.game.width;
|
||||
}
|
||||
|
||||
if (height < this.game.height)
|
||||
{
|
||||
height = this.game.height;
|
||||
}
|
||||
if (height < this.game.height)
|
||||
{
|
||||
height = this.game.height;
|
||||
}
|
||||
|
||||
this.bounds.setTo(x, y, width, height);
|
||||
|
||||
if (this.camera.bounds)
|
||||
{
|
||||
// The Camera can never be smaller than the game size
|
||||
|
||||
this.camera.bounds.setTo(x, y, width, height);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user