mirror of
https://github.com/wassname/phaser.git
synced 2026-09-13 12:51:23 +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
-4
@@ -207,28 +207,32 @@ Phaser.Camera.prototype = {
|
||||
|
||||
if (this.deadzone)
|
||||
{
|
||||
this._edge = this.target.bounds.x - this.deadzone.x;
|
||||
// this._edge = this.target.bounds.x - this.deadzone.x;
|
||||
this._edge = this.target.x - this.deadzone.x;
|
||||
|
||||
if (this.view.x > this._edge)
|
||||
{
|
||||
this.view.x = this._edge;
|
||||
}
|
||||
|
||||
this._edge = this.target.bounds.right - this.deadzone.x - this.deadzone.width;
|
||||
// this._edge = this.target.bounds.right - this.deadzone.x - this.deadzone.width;
|
||||
this._edge = this.target.x + this.target.width - this.deadzone.x - this.deadzone.width;
|
||||
|
||||
if (this.view.x < this._edge)
|
||||
{
|
||||
this.view.x = this._edge;
|
||||
}
|
||||
|
||||
this._edge = this.target.bounds.y - this.deadzone.y;
|
||||
// this._edge = this.target.bounds.y - this.deadzone.y;
|
||||
this._edge = this.target.y - this.deadzone.y;
|
||||
|
||||
if (this.view.y > this._edge)
|
||||
{
|
||||
this.view.y = this._edge;
|
||||
}
|
||||
|
||||
this._edge = this.target.bounds.bottom - this.deadzone.y - this.deadzone.height;
|
||||
// this._edge = this.target.bounds.bottom - this.deadzone.y - this.deadzone.height;
|
||||
this._edge = this.target.y + this.target.height - this.deadzone.y - this.deadzone.height;
|
||||
|
||||
if (this.view.y < this._edge)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user