Closed ghost closed 4 years ago
The code was quite chaotic, I agree. I hope this clears it up. I used the awesome coroutine feature to implement the end delay.
Really had to wrap my head around that Coroutine stuff there. Its just weird to see code after a return statement. But it seems to be a good feature to get stuff controlled over multiple frames. Nice work.
The game now ends three seconds after there are no infections left or the player dies. This delay can be changed from the Unity Editor. Also, ending the level after a timeout is still possbile - in the Unity Editor, set EndGameController->LevelTimeout to a value > 0. Resolves #37.