LTDescr.setRepeat C# (CSharp) Method

setRepeat() public method

public setRepeat ( int repeat ) : LTDescr
repeat int
return LTDescr
    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;
    }

Usage Example

Beispiel #1
0
 void Start()
 {
     Tween = LeanTween.move(gameObject, Paths, Paths.Count());
     Tween.setRepeat(999).setOnComplete(() => Destroy(gameObject));
 }
LTDescr