Skip to content

Commit

Permalink
add state diagram to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
awwsmm committed Mar 12, 2024
1 parent 677fcfa commit 49dda7c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions examples/games/game_menu.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
//! This example will display a simple menu using Bevy UI where you can start a new game,
//! change some settings or quit. There is no actual game, it will just display the current
//! settings for 5 seconds before going back to the menu.
//!
//! STATE DIAGRAM
//!
//! ```
//! Start
//! v
//! GameState::Splash
//! |
//! |---------------------------------------------------------------------|
//! | | GameState::Menu |
//! | | v------back-------< |
//! | v v | |
//! | MenuState::Main >-settings-> MenuState::Settings <--------------< |
//! | v ^ | | | |
//! | | | sound display | |
//! | play | v v | |
//! | | | MenuState::SettingsSound MenuState::SettingsDisplay | |
//! | | | | | | |
//! | | | >-------------->--------------------^ |
//! |---+----+------------------------------------------------------------|
//! | |
//! | timer
//! v ^
//! GameState::Game
//! ```
use bevy::prelude::*;

Expand Down

0 comments on commit 49dda7c

Please sign in to comment.