mirror of
https://github.com/photonstorm/phaser
synced 2024-11-25 06:00:41 +00:00
Added postUpdate NOOP
This commit is contained in:
parent
4d976e59d1
commit
6947a68152
1 changed files with 10 additions and 2 deletions
|
@ -208,6 +208,11 @@ var World = new Class({
|
|||
return this;
|
||||
},
|
||||
|
||||
postUpdate: function ()
|
||||
{
|
||||
// NOOP
|
||||
},
|
||||
|
||||
update: function (time, delta)
|
||||
{
|
||||
if (!this.enabled || this.bodies.size === 0)
|
||||
|
@ -216,7 +221,10 @@ var World = new Class({
|
|||
}
|
||||
|
||||
// Impact uses a divided delta value that is clamped to the maxStep (20fps) maximum
|
||||
this.delta = Math.min(delta / 1000, this.maxStep) * this.timeScale;
|
||||
|
||||
var clampedDelta = Math.min(delta / 1000, this.maxStep) * this.timeScale;
|
||||
|
||||
this.delta = clampedDelta;
|
||||
|
||||
// Update all active bodies
|
||||
|
||||
|
@ -233,7 +241,7 @@ var World = new Class({
|
|||
|
||||
if (body.enabled)
|
||||
{
|
||||
body.update(this.delta);
|
||||
body.update(clampedDelta);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue