Esempio n. 1
0
 void Update()
 {
     if (thread != null && !thread.IsDead())
     {
         thread.Resume();
     }
 }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        if (!co.IsDead())
        {
            co.Resume();
        }
        else
        {
            print("Coroutine has exited.");

            // In order to destroy a coroutine (but not the function in lua, just the coroutine stack instance) simply allow C# to clean up the wrapped object
            co = null;
        }
    }