public LTDescr setRepeat( int repeat ) { this.loopCount = repeat; if((repeat>1 && this.loopType == LeanTweenType.once) || (repeat < 0 && this.loopType == LeanTweenType.once)){ this.loopType = LeanTweenType.clamp; } if(this.type==TweenAction.CALLBACK || this.type==TweenAction.CALLBACK_COLOR){ this.setOnCompleteOnRepeat(true); } return this; }
void Start() { Tween = LeanTween.move(gameObject, Paths, Paths.Count()); Tween.setRepeat(999).setOnComplete(() => Destroy(gameObject)); }