In randori.timer.Timer.prototype.onTimerTick, this.stop() is called at the end of the method, causing timerTick to only be issued once. Below is the code from randori-framework.js.
It seems that this.stop() should be moved into the if-statment.
randori.timer.Timer.prototype.onTimerTick = function() {
this._currentCount++;
this.timerTick.dispatch(this, this._currentCount);
if (this._currentCount == this._repeatCount) {
this.timerComplete.dispatch(this);
}
this.stop();
};
In randori.timer.Timer.prototype.onTimerTick, this.stop() is called at the end of the method, causing timerTick to only be issued once. Below is the code from randori-framework.js.
It seems that this.stop() should be moved into the if-statment.
randori.timer.Timer.prototype.onTimerTick = function() {
this._currentCount++;
this.timerTick.dispatch(this, this._currentCount);
if (this._currentCount == this._repeatCount) {
this.timerComplete.dispatch(this);
}
this.stop();
};