mirror of
https://github.com/photonstorm/phaser
synced 2024-12-24 12:03:36 +00:00
Add delta arg to WORLD_STEP event
This commit is contained in:
parent
8f48d39934
commit
e194e9586f
2 changed files with 7 additions and 5 deletions
|
@ -983,7 +983,7 @@ var World = new Class({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.emit(Events.WORLD_STEP);
|
this.emit(Events.WORLD_STEP, fixedDelta);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process any additional steps this frame
|
// Process any additional steps this frame
|
||||||
|
@ -1042,7 +1042,7 @@ var World = new Class({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.emit(Events.WORLD_STEP);
|
this.emit(Events.WORLD_STEP, delta);
|
||||||
|
|
||||||
this.stepsLastFrame++;
|
this.stepsLastFrame++;
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,5 +16,7 @@
|
||||||
*
|
*
|
||||||
* @event Phaser.Physics.Arcade.Events#WORLD_STEP
|
* @event Phaser.Physics.Arcade.Events#WORLD_STEP
|
||||||
* @since 3.18.0
|
* @since 3.18.0
|
||||||
|
*
|
||||||
|
* @param {number} delta - The delta time amount of this step, in seconds.
|
||||||
*/
|
*/
|
||||||
module.exports = 'worldstep';
|
module.exports = 'worldstep';
|
||||||
|
|
Loading…
Reference in a new issue