GoTween.destroy C# (CSharp) Метод

destroy() публичный Метод

removes the tween and cleans up its state
public destroy ( ) : void
Результат void
    public override void destroy()
    {
        base.destroy();

        _tweenPropertyList.Clear();
        target = null;
    }

Usage Example

Пример #1
0
    public void Grow()
    {
        if (tween != null)
        {
            tween.destroy();
        }

        var scaleProperty = new ScaleTweenProperty(new Vector3(maxSize, maxSize, maxSize));
        var config        = new GoTweenConfig();

        config.addTweenProperty(scaleProperty);

        tween = new GoTween(transform, growingSpeed, config);
        tween.setOnCompleteHandler(c => {
            StartExplosionEffect();
            Invoke("Explode", timeToExplode);
        });

        Go.addTween(tween);

        Go.to(transform, 5f, new GoTweenConfig()
              .eulerAngles(new Vector3(0, 0, 360))
              .setEaseType(GoEaseType.Linear)
              .setIterations(-1, GoLoopType.RestartFromBeginning)
              );
    }
All Usage Examples Of GoTween::destroy