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

Method constructor

src/scripting/api/Tween/Tween.ts:25–36  ·  view source on GitHub ↗
(target:any, duration:number = 0)

Source from the content-addressed store, hash-verified

23 public step:Function = () => {};
24
25 constructor(target:any, duration:number = 0) {
26 this._target = target;
27 this._duration = duration;
28 this._timeKeeper = new Runtime.TimeKeeper();
29 this._timer = new Runtime.Timer(40);
30
31 // Timer related
32 var self:ITween = this;
33 this._timer.addEventListener("timer", () => {
34 self._onTimerEvent();
35 });
36 }
37
38 private _onTimerEvent():void {
39 // Ignore all the timer events if we're not playing

Callers

nothing calls this directly

Calls 2

addEventListenerMethod · 0.65
_onTimerEventMethod · 0.45

Tested by

no test coverage detected