@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.
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.