Exemplo n.º 1
0
 public void ExecuteTween(TweenBase tween)
 {
     if (!IsPreview)
     {
         Timing.RunCoroutine(RunTween(tween));
     }
     else
     {
         Timing.RunCoroutine(RunTween(tween), Segment.EditorUpdate);                // preview update loop.
     }
 }
Exemplo n.º 2
0
        //execute tween:
        static IEnumerator <float> RunTween(TweenBase tween)
        {
            Tween.activeTweens.Add(tween);

            while (true)
            {
                //tick tween:
                if (!tween.Tick())
                {
                    //clean up tween:
                    Tween.activeTweens.Remove(tween);
                    yield break;
                }

                //loop:
                yield return(0);
            }
        }
Exemplo n.º 3
0
        //Coroutines:
        //execute tween:
        static IEnumerator RunTween(TweenBase tween)
        {
            Tween.activeTweens.Add(tween);
            //Debug.Log("Nuevo Tween");
            while (true)
            {
                //tick tween:
                if (!tween.Tick())
                {
                    //Debug.Log("Tween ya no hace tick");
                    //clean up tween:
                    Tween.activeTweens.Remove(tween);
                    yield break;
                }

                //loop:
                yield return(null);
            }
        }
Exemplo n.º 4
0
 //Public Methods:
 public void ExecuteTween(TweenBase tween)
 {
     StartCoroutine(RunTween(tween));
 }
Exemplo n.º 5
0
 public void ExecuteTween(TweenBase tween) 

 {
     
 Tween.activeTweens.Add(tween); 

 }