All Timer events are now increased by the game time on start.

This commit is contained in:
photonstorm 2014-03-24 12:15:14 +00:00
parent 622957c9b0
commit 87a0fb86b8
9 changed files with 57 additions and 12 deletions

View file

@ -7,7 +7,7 @@
*
* Phaser - http://www.phaser.io
*
* v2.0.1 "Lyrelle" - Built: Mon Mar 24 2014 02:25:16
* v2.0.1 "Lyrelle" - Built: Mon Mar 24 2014 12:12:46
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
@ -27255,9 +27255,20 @@ Phaser.Timer.prototype = {
*/
start: function () {
if (this.running)
{
return;
}
this._started = this.game.time.now;
this.running = true;
for (var i = 0; i < this.events.length; i++)
{
this.events[i].tick = this.events[i].delay + this._started;
}
},
/**

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,7 @@
*
* Phaser - http://www.phaser.io
*
* v2.0.1 "Lyrelle" - Built: Mon Mar 24 2014 02:25:16
* v2.0.1 "Lyrelle" - Built: Mon Mar 24 2014 12:12:46
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
@ -9604,7 +9604,7 @@ PIXI.RenderTexture.tempMatrix = new PIXI.Matrix();
*
* Phaser - http://www.phaser.io
*
* v2.0.1 "Lyrelle" - Built: Mon Mar 24 2014 02:25:16
* v2.0.1 "Lyrelle" - Built: Mon Mar 24 2014 12:12:46
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
@ -36852,9 +36852,20 @@ Phaser.Timer.prototype = {
*/
start: function () {
if (this.running)
{
return;
}
this._started = this.game.time.now;
this.running = true;
for (var i = 0; i < this.events.length; i++)
{
this.events[i].tick = this.events[i].delay + this._started;
}
},
/**

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,7 @@
*
* Phaser - http://www.phaser.io
*
* v2.0.1 "Lyrelle" - Built: Mon Mar 24 2014 02:25:16
* v2.0.1 "Lyrelle" - Built: Mon Mar 24 2014 12:12:46
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
@ -9604,7 +9604,7 @@ PIXI.RenderTexture.tempMatrix = new PIXI.Matrix();
*
* Phaser - http://www.phaser.io
*
* v2.0.1 "Lyrelle" - Built: Mon Mar 24 2014 02:25:16
* v2.0.1 "Lyrelle" - Built: Mon Mar 24 2014 12:12:46
*
* By Richard Davey http://www.photonstorm.com @photonstorm
*
@ -36852,9 +36852,20 @@ Phaser.Timer.prototype = {
*/
start: function () {
if (this.running)
{
return;
}
this._started = this.game.time.now;
this.running = true;
for (var i = 0; i < this.events.length; i++)
{
this.events[i].tick = this.events[i].delay + this._started;
}
},
/**

File diff suppressed because one or more lines are too long

4
build/phaser.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -39,6 +39,7 @@ Bug Fixes
* BitmapDatas when used as Game Object textures in WebGL now update themselves properly.
* Timer.ms now correctly reports the ms time even if the Timer has been paused (thanks Nambew, fix #624)
* If you added a Tileset to an empty map it would eventually throw an out of memory error.
* Timer objects incorrectly set the first tick value on events if you added the events prior to starting them.
Updated

View file

@ -234,9 +234,20 @@ Phaser.Timer.prototype = {
*/
start: function () {
if (this.running)
{
return;
}
this._started = this.game.time.now;
this.running = true;
for (var i = 0; i < this.events.length; i++)
{
this.events[i].tick = this.events[i].delay + this._started;
}
},
/**