Exemplo n.º 1
0
    protected static bool RemoveTween(string identifier, TweenStopState stopState)
    {
        bool founded = false;

        for (int i = 0; i < tweens.Count - 1; i++)
        {
            Tween tween = tweens[i];

            if (identifier == tween.identifier)
            {
                tween.Stop(stopState);
                tweens.RemoveAt(i);
                founded = true;
            }
        }

        return(founded);
    }
Exemplo n.º 2
0
    public void Stop(TweenStopState stopState)
    {
        if (state != TweenState.Stopped)
        {
            state = TweenState.Stopped;

            if (stopState == TweenStopState.Complete)
            {
                currentTime = duration;
                UpdateValue();

                if (finishCallback != null)
                {
                    finishCallback.Invoke(this);
                    finishCallback = null;
                }
            }
        }
    }
Exemplo n.º 3
0
 protected static bool RemoveTween(Tween tween, TweenStopState stopState)
 {
     tween.Stop(stopState);
     return(tweens.Remove(tween));
 }