Level System


Some refactoring was done to the win loss system to plug in the level system so that we could check if the current level was passed in order to decide if we would reload the current level or progress to the next.

Rather than duplicating scenes which would not be very efficient i have create a game manager script and object tagged with DoNotDestroy which has functions subscribed to when the scene is loaded.
The game manager is reads information from the win/loss results and using this to update itself (update the max time allowed, the target score to beat and index the level up) before the scene is reloaded. Once reloaded the game manager re-sets up the environment to present the subsequent level. This allows us to create a finite amount of levels specified by us using only the 1 unity scene.

-Sal

Leave a comment

Log in with itch.io to leave a comment.