Exemple #1
0
    public void SpawnLevel()
    {
        levelNumber++;


        for (int i = 0; i < levelNumber; i++)
        {
            BulletSpawner spawner = spawners.ReQueue();
            spawner.transform.position  = Vector3.zero;
            spawner.transform.position += (Vector3)Random.insideUnitCircle.normalized * 8f;
            spawner.data  = spawnerDataList.GetRandom();
            spawner.inUse = true;
            if (levelNumber % 3 == 0)
            {
                spawner.SpawnHoming();
            }
            else
            {
                spawner.SpawnAngled();
            }
        }
    }