Beispiel #1
0
    IEnumerator GameTaskUpdate()
    {
        while (true)
        {
            if (gameTasks.Count == 0)
            {
                yield return(new WaitForSeconds(0.1f));

                continue;
            }

            GameTask gameTask = gameTasks.Dequeue();
            gameTask.Execute();
            yield return(new WaitForSeconds(gameTask.duration));
            //Debug.Log("Finished Task: " + gameTask.actionString);
        }
    }