Пример #1
0
    IEnumerator GameLoop()
    {
        maxDist = distanceGet.GetDistance();
        timerScript.StartTimer();
        running = true;
        startButton.interactable = false;
        resetButton.interactable = true;
        sliderScript.SetInteractibility(running);
        yield return(StartCoroutine(Spawn()));

        yield return(new WaitForSeconds(moveNum * 3 + 2));

        while (!complete)
        {
            yield return(StartCoroutine(IterateGeneration()));
        }
    }