mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 14:38:30 +00:00
Timers can now have a start delay value (thanks @georgiee, #660)
This commit is contained in:
parent
d57cc9a9e0
commit
686706173a
2 changed files with 5 additions and 3 deletions
|
@ -69,11 +69,13 @@ Updated
|
|||
|
||||
* Return the result of P2.Body.setCircle for further chaining and manipulation (fix #659)
|
||||
* Updated the PhysicsEditor plugin to maintain position, radius, mask bits, category bits and sensor flags (thanks @georgiee, #674)
|
||||
* Further TypeScript defs tweaks (thanks @clark-stevenson)
|
||||
|
||||
|
||||
New Features
|
||||
|
||||
* Added ability to retrieve a single p2 fixture from the cache (thanks @georgiee, #674)
|
||||
* Timers can now have a start delay value (thanks @georgiee, #660)
|
||||
|
||||
|
||||
ToDo
|
||||
|
|
|
@ -231,16 +231,16 @@ Phaser.Timer.prototype = {
|
|||
/**
|
||||
* Starts this Timer running.
|
||||
* @method Phaser.Timer#start
|
||||
* @param {number} startDelay - The number of milliseconds that should elapse before the Timer will start.
|
||||
* @param {number} [delay=0] - The number of milliseconds that should elapse before the Timer will start.
|
||||
*/
|
||||
start: function (startDelay) {
|
||||
start: function (delay) {
|
||||
|
||||
if (this.running)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this._started = this.game.time.now + (startDelay || 0);
|
||||
this._started = this.game.time.now + (delay || 0);
|
||||
|
||||
this.running = true;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue