MCPcopy
hub / github.com/jabbany/CommentCoreLibrary / _onTimerEvent

Method _onTimerEvent

src/scripting/api/Tween/Tween.ts:38–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 }
37
38 private _onTimerEvent():void {
39 // Ignore all the timer events if we're not playing
40 if (this._isPlaying) {
41 this._currentTime += this._timeKeeper.elapsed;
42 this._timeKeeper.reset();
43 this.step(this._target, this._currentTime, this._duration);
44 if (this._currentTime >= this._duration) {
45 this._repeats--;
46 if (this._repeats < 0) {
47 this.stop();
48 this._currentTime = this._duration;
49 } else {
50 this._currentTime = 0;
51 }
52 this.step(this._target, this._currentTime, this._duration);
53 }
54 }
55 }
56
57 set duration(dur:number) {
58 this._duration = dur;

Callers 1

constructorMethod · 0.45

Calls 2

stopMethod · 0.95
resetMethod · 0.65

Tested by

no test coverage detected