Ejemplo n.º 1
0
    //VARS

    //LISTS

    public IEnumerator Load()
    {
        M   = GameObject.FindWithTag("Manager").GetComponent <Manager>();
        MM  = GameObject.FindWithTag("MenuManager").GetComponent <MenuManager>();
        MUI = MM.GetComponent <ManagerUI>();

        StartCoroutine(TG.Generate());
        while (TG.isWorking)
        {
            yield return(null);
        }

        for (int i = 0; i < Roads.Count; i++)
        {
            yield return(null);

            yield return(null);

            Roads[i].SpawnCars(M);
        }

        yield return(null);

        MUI.ShowStartMenu();

        M.GameStarted = true;
    }