1use bevy::prelude::*;
2use bevy_lunex::UiSystems;
3use components::SplashTimer;
4use systems::build_splash;
5
6use crate::UiState;
7
8use self::systems::count_down;
9
10pub mod components;
11pub mod systems;
12
13pub struct SplashPlugin;
14impl Plugin for SplashPlugin {
15 fn build(&self, app: &mut App) {
16 app.insert_resource::<SplashTimer>(SplashTimer(Timer::from_seconds(5.0, TimerMode::Once)))
17 .add_systems(
18 Update,
19 (
20 build_splash.before(UiSystems::Compute),
21 count_down.run_if(in_state(UiState::Splash)),
22 ),
23 );
24 }
25}