Пример #1
0
    IEnumerator Start()
    {
        while (spawn)
        {
            Debug.Log(spawn + " " + !gameManager.IsGamePaused());
            yield return(new WaitForSecondsRealtime(Random.Range(spawnTimerMin, spawnTimerMax)));

            if (spawn && !gameManager.IsGamePaused())
            {
                Debug.Log("spawning");  SpawnEnemies();
            }
        }
    }
Пример #2
0
    IEnumerator Start()
    {
        while (spawn)
        {
            yield return(new WaitForSecondsRealtime(Random.Range(spawnTimerMin, spawnTimerMax)));

            InRange();
            if (spawn && inRange && !gameManager.IsGamePaused())
            {
                myAnimator.SetTrigger("isSpawning");
            }
        }
    }