Increase List of Spawns Dynamically

Hello, I’ve been using some code (which I take no credit for using) which spawns enemies at set spawn points, at set intervals.

I have now included “blockages” to parts of the map. Meaning the player must remove them if they want to advance to a new part of the map.

Now I was hoping to make Spawn Points become “active” or “enabled” as the player removes these blockages. Pretty much like Call Of Duty: Zombies.

A huge thanks in advance if you can help me.

P.S: This is the spawning code that I have currently.
using UnityEngine;
using System.Collections;

public class SpawnWaveGenerator : MonoBehaviour
{

    [System.Serializable]
    public class enemy
    {
        public string name;
        public GameObject prefab;
        public float chance;
        public float delayTime;
    }

    public Transform[] points;
    public enemy[] enemies;
    public int SpawnTimer;

    enemy chosenEnemy;

    float random;
    float cumulative;

    void Start()
    {
        SpawnTimer = 0;
    }

    void Update()
    {
        SpawnTimer = SpawnTimer + 1;
        if (SpawnTimer >= 100)
        {
            SpawnRandom();
            SpawnTimer = 0;
        }
    }

    void SpawnRandom()
    {
        random = Random.value;
        cumulative = 0f;

        for (int i = 0; i < enemies.Length; i++)
        {
            cumulative += enemies*.chance;*

if (random < cumulative && Time.time >= enemies*.delayTime)*
{
chosenEnemy = enemies*;*
break;
}
}

Instantiate(chosenEnemy.prefab, points[Random.Range(0, points.Length)].position, points[Random.Range(0, points.Length)].rotation);
}
}

If you’re asking how to enable / disable spawn points depending on progression within the game, then there are a number of possible ways.

One might be to have a spawn point manager which simple enables / disables the spawn objects (either the game object they are attached to or the component).

Another would be to simply have an ‘active’ variable in the spawn script which you change and test for in your updates.

Another would be to give each spawn script an ‘active at’ variable which is tested for. When the player hits level 4, any spawn point with an ‘active at’ value of 4 or greater would then allow spawns to occur.

These are just a few ways, the best way really does depend on your game but I’d probably have a spawn point manger which tracks all the spawn points and either enables / disables them, or just serves as a way of requesting / updating the current game progression.