Timers can now have a start delay value (thanks @georgiee, #660)

This commit is contained in:
photonstorm 2014-03-31 10:49:53 +01:00
parent d57cc9a9e0
commit 686706173a
2 changed files with 5 additions and 3 deletions

View file

@ -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

View file

@ -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;