VDP-noclip / noclip

NOCLIP is an experimental game in which you “noclip” the environment to solve puzzles.
3 stars 1 forks source link

Improve game manager and puzzle manager code #79

Closed spig95 closed 1 year ago

spig95 commented 1 year ago

Game Manager

@TizioMaurizio as discussed, I removed the additive scene loader component from the game manager and I rely uniquely on the list _gameAreas.

Moreover, I have added the GameCompleted state (I think you already added it, and I removed it by mistake). We are in this state when we finish the last area in _gameAreas.

Puzzle Manager

Here I made a minor improvement. Instead of using an exception, I check when we reach the final puzzle index and act accordingly. I think the code is easier to read and to maintain in case we find bugs.