Skip to content

Commit

Permalink
Bump iyes_progress
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasEi committed Dec 1, 2024
1 parent 36d6eb7 commit 75c2d82
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bevy_asset_loader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ path-slash = "0.2"

bevy_common_assets = { version = "0.12.0", features = ["ron"], optional = true }
serde = { version = "1", optional = true }
iyes_progress = { version = "0.13.0-rc.1", optional = true }
iyes_progress = { version = "0.13.0", optional = true }

[dev-dependencies]
bevy = { version = "0.15.0", features = ["vorbis"] }
anyhow = "1"
iyes_progress = { version = "0.13.0-rc.1" }
iyes_progress = { version = "0.13.0" }
bevy_common_assets = { version = "0.12.0", features = ["ron"] }
serde = { version = "1" }
ron = "0.8.1"
Expand Down
11 changes: 11 additions & 0 deletions bevy_asset_loader/examples/progress_tracking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fn main() {
.load_collection::<TextureAssets>()
.load_collection::<AudioAssets>(),
)
.add_systems(OnEnter(MyStates::AssetLoading), render_description)
// gracefully quit the app when `MyStates::Next` is reached
.add_systems(OnEnter(MyStates::Next), expect)
.add_systems(
Expand Down Expand Up @@ -66,6 +67,16 @@ struct TextureAssets {
female_adventurer_layout: Handle<TextureAtlasLayout>,
}

fn render_description(mut commands: Commands) {
commands.spawn(Camera2d::default());
commands.spawn(Text::new(
r#"
See the console for progress output
This window will close when progress completes..."#,
));
}

fn track_fake_long_task(time: Res<Time>) -> Progress {
if time.elapsed_secs_f64() > DURATION_LONG_TASK_IN_SECS {
info!("Long fake task is completed");
Expand Down

0 comments on commit 75c2d82

Please sign in to comment.