Exemple #1
0
    // Update is called once per frame
    void Update()
    {
        if (gameController.state != GameController.States.battle)
        {
            return;
        }

        if (levelSettings.enemyCount < levelSettings.enemyLimit)
        {
            spawners[Random.Range(0, spawners.Length)].SpawnEnemy(levelSettings.GetEnemyPrefab());
        }
    }