Newer
Older
use iyes_loopless::prelude::{AppLooplessStateExt, ConditionSet};
mod menu_state;
pub struct StatesPlugin;
impl Plugin for StatesPlugin {
fn build(&self, app: &mut App) {
app.add_enter_system(AppState::Menu, menu_state::spawn_menu_entities)
.add_exit_system(AppState::Menu, menu_state::despawn_menu_entities)
.add_enter_system(AppState::InGame, game_state::on_enter_game)
.add_system_set(
ConditionSet::new()
.run_in_state(AppState::Menu)
.with_system(go_to_game)
.into(),
);
pub use game_state::Player;