I have a shooter game where the player is fighting against 3 enemies. When the player kills all three of them, player has to move to an other area. Here is the pic:
So we begin at 1. The colored boxes are the walls or barriers. When the enemies are still acitve you cant trespass through the barrier. Only when they are killed. And when they are killed, the player has to go to 2. After the traspassing the blue barrier should then not be trespassable and the green one also. Then the 3 enemies can spawn in area 2. And so on. Do you guys know how I can implement that kind of dynamic barrier?