Merge pull request #729 from garyyeap/fix-timer-event

Fixed that the TimerEvent should flag as pendingDelete before calling the callback, because callback might trigger the reorder function
This commit is contained in:
Richard Davey 2014-04-16 00:25:15 +01:00
commit b569f920bd

View file

@ -408,8 +408,8 @@ Phaser.Timer.prototype = {
}
else
{
this.events[this._i].callback.apply(this.events[this._i].callbackContext, this.events[this._i].args);
this.events[this._i].pendingDelete = true;
this.events[this._i].callback.apply(this.events[this._i].callbackContext, this.events[this._i].args);
}
this._i++;