The GlobalEvents FSM manages global events. In this example, the pause key.
This FSM could grow to handle other similar global events...
Another approach would be to have a GameState FSM (probably a better approach).
FSM Diagram
States
Events
- pause
- unpause
Variables
- paused - a bool variable to track paused state