Exemple #1
0
    IEnumerator DoWait(OnTweenWaitDelegate waitBack, float dur)
    {
        yield return(new WaitForSeconds(dur));

        if (waitBack != null)
        {
            waitBack();
        }
        Destroy(this);
    }
Exemple #2
0
    static public void Begin(GameObject go, OnTweenWaitDelegate func, float duration)
    {
        TweenWait comp = go.GetComponent <TweenWait>();

#if UNITY_FLASH
        if ((object)comp == null)
        {
            comp = (TweenWait)go.AddComponent <TweenWait>();
        }
#else
        if (comp == null)
        {
            comp = go.AddComponent <TweenWait>();
        }
#endif
        comp.BeginStartCoroutine(func, duration);
    }
Exemple #3
0
 public void BeginStartCoroutine(OnTweenWaitDelegate func, float duration)
 {
     StartCoroutine(DoWait(func, duration));
 }