コード例 #1
0
    private void Summon()
    {
        AllEnemies gameEnemies = QuestManager.instance.gameEnemies;

        GameObject[] enemies = gameEnemies.orcPrefabs;
        switch (enemyType)
        {
        case EnemyType.Orc:
            enemies = gameEnemies.orcPrefabs;
            break;

        case EnemyType.Dreg:
            enemies = gameEnemies.dregPrefabs;
            break;

        case EnemyType.SkeletonSoldier:
            enemies = gameEnemies.skeletonPrefabs;
            break;
        }
        for (int i = 0; i < spawnLocations.Length; i++)
        {
            GameObject newEnemy = gameEnemies.SpawnRandomEnemy(enemies, level, spawnLocations[i]);
            spawnedEnemies.Add(newEnemy);
        }
        StartCoroutine(CheckEnemies());
    }