Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timer timerTick Signal only dispatched once when repeatCount = 0 #38

Open
sgriffith opened this issue Jun 3, 2013 · 0 comments
Open

Comments

@sgriffith
Copy link

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();
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant