public virtual void tick(float now) { if (startTime > now) { return; } if (_timer == 0f) { if (onStart != null) { onStart(this); } } _timer = Mathf.Min(now - startTime, this.duration); float progress = (this.duration <= 0f) ? 1f : Mathf.Clamp01(this._timer / this.duration); doProgress(progress); if (onProgress != null) { onProgress(this, progress); } if (isCompleted) { if (onComplete != null) { onComplete(this); } this.state = NodeActiveState.ToDoDelete; } }
public virtual void endTween() { _timer = this.duration; doProgress(1); if (onComplete != null) { onComplete(this); } this.state = NodeActiveState.ToDoDelete; }
public virtual void stop() { this.state = NodeActiveState.ToDoDelete; }