PlaceholderGames / 2122-yr1-team-cookieshot

CS1S464 2021/22 Team Cookieshot
0 stars 0 forks source link

Death Pits #14

Closed FedoraGoat closed 2 years ago

FedoraGoat commented 3 years ago

Hi so Im still working through the level design and I just wondered how we could get the level to start over if all 3 robots die? Something such as when the robot counter = 0, it resets the level the player is on

DoctorMikeReddy commented 3 years ago

You will need some form of counter. In the spawn code there is a way to see how many robots exist; it is currently used to determine how many to spawn. Once all of the required number are spawned you could have a boolean that stops further spawns, which could then be used to check along with the number of robots left - you don't want to do this until they are all on screen - to determine if too many have been lost