> For the complete documentation index, see [llms.txt](https://kdoore.gitbook.io/cs2335/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kdoore.gitbook.io/cs2335/master_v2/mini-game_proj3/level-manager-in-class/level-manager-logic-diagram.md).

# LevelManager Logic Diagram

## Event-Logic Diagram

{% file src="/files/-M4yxOLa0AMZ3jAplru2" %}
LevelManager.pdf
{% endfile %}

* **Game-Events trigger execution of LevelManager methods:**&#x20;
* **NextLevel( )** implements FiniteStateMachine based on variable: `LevelState: curLevel`
  * GameData.onPlayerDataUpdate --> MiniGameOver( )
  * LevelManager: Timer complete --> ReloadMiniGame( )&#x20;
  * PlayerController.onPlayerDied --> MiniGameOver( )
  * GameData.onPlayerDataUpdate --> NextLevel( )&#x20;
  * PlayerController.onPlayerReachExit -->NextLevel( )
  * LevelManager: Timer complete --> ReloadMiniGame( )&#x20;

![](https://2944698967-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0-KLgOacVpbicrqehO%2F-M5Xgx1xryHyFPTN_hS5%2F-M5XhKyW7hchW6Qkfljl%2FScreen%20Shot%202020-04-22%20at%2011.24.57%20AM.png?alt=media\&token=246c8ab9-7e17-4f33-a808-5004a579b21a)
