Fixed that the TimerEvent should flag as pendingDelete before calling the callback, because callback might trigger the reorder function

This commit is contained in:
Gary 2014-04-16 05:46:03 +08:00
parent 18c524c433
commit 1cf9ff9f2f

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