diff --git a/Cargo.toml b/Cargo.toml index 72f417c75d52a..8570739a6447a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ keywords = ["game", "engine", "gamedev", "graphics", "bevy"] license = "MIT OR Apache-2.0" repository = "https://github.com/bevyengine/bevy" documentation = "https://docs.rs/bevy" -rust-version = "1.89.0" +rust-version = "1.91.0" [workspace] resolver = "2" @@ -2674,6 +2674,27 @@ description = "Illustrates ticking `Timer` resources inside systems and handling category = "Time" wasm = false +[[example]] +name = "groundhog_day" +path = "examples/time/groundhog_day.rs" +doc-scrape-examples = true + +[package.metadata.example.groundhog_day] +name = "Groundhog Day" +description = "Shows how `Time` can be used to go back in time." +category = "Time" +wasm = false + +[[example]] +name = "stepped_simulation" +path = "examples/time/stepped_simulation.rs" +doc-scrape-examples = true + +[package.metadata.example.stepped_simulation] +name = "Stepped Simulation" +description = "Shows how `Time` can be used to track a simulation." +category = "Time" +wasm = false # Games [[example]] diff --git a/crates/bevy_dev_tools/src/easy_screenshot.rs b/crates/bevy_dev_tools/src/easy_screenshot.rs index 28e166e525c4e..2ee1b73cca3ce 100644 --- a/crates/bevy_dev_tools/src/easy_screenshot.rs +++ b/crates/bevy_dev_tools/src/easy_screenshot.rs @@ -303,7 +303,7 @@ impl Plugin for EasyScreenRecordPlugin { let img = screenshot_captured.image.clone(); tx.send(RecordCommand::Frame(img)).unwrap(); virtual_time.advance_by(frame_time); - *time = virtual_time.as_generic(); + *time = virtual_time.as_other(); }, ); } diff --git a/crates/bevy_time/src/fixed.rs b/crates/bevy_time/src/fixed.rs index b1483de3f6236..f90d588128bbb 100644 --- a/crates/bevy_time/src/fixed.rs +++ b/crates/bevy_time/src/fixed.rs @@ -249,12 +249,12 @@ pub fn run_fixed_main_schedule(world: &mut World) { // Run the schedule until we run out of accumulated time let _ = world.try_schedule_scope(FixedMain, |world, schedule| { while world.resource_mut::>().expend() { - *world.resource_mut::