// SPDX-License-Identifier: MIT OR Apache-2.0 use bevy::prelude::*; use iyes_progress::{Progress, ProgressPlugin, ProgressSystem}; use jammy::splash_screen::JammySplashScreenPlugin; const SHORT_TASK_SECS: usize = 1; const MEDIUM_TASK_SECS: usize = 5; const LONG_TASK_SECS: usize = 10; #[derive(States, Default, Debug, Hash, PartialEq, Eq, Clone)] enum AppState { #[default] Loading, Done, } fn main() { App::new() .add_plugins(DefaultPlugins) .add_state::() .add_plugin(ProgressPlugin::new(AppState::Loading).continue_to(AppState::Done)) .add_plugin(JammySplashScreenPlugin::new(AppState::Loading)) .add_system( fake_task:: .track_progress() .run_if(in_state(AppState::Loading)), ) .add_system( fake_task:: .track_progress() .run_if(in_state(AppState::Loading)), ) .add_system( fake_task:: .track_progress() .run_if(in_state(AppState::Loading)), ) .run(); } fn fake_task(time: Res