Compare commits
No commits in common. "3ae8de91796c5b8c3848bc41ea29f3ea7d821a24" and "de9b8d99e88ea9349bb24fd642b9ace9ddc2d926" have entirely different histories.
3ae8de9179
...
de9b8d99e8
|
@ -1,10 +1,4 @@
|
|||
# v0.13.0-dev
|
||||
|
||||
- Reduce power usage when the menu is open or the window is unfocused
|
||||
- Add sparkles to Jupiter's ring ✨😍✨ best visible from Farview Station
|
||||
- Add oxygen tank near Luna's workshop, refills oxygen on interaction
|
||||
|
||||
# v0.12.0
|
||||
# v0.12.0-dev
|
||||
|
||||
- Overhaul pizzeria asteroid
|
||||
- Implement thruster particle effects (only in AR, as they'd be invisble in RL)
|
||||
|
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -3039,7 +3039,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "outfly"
|
||||
version = "0.13.0-dev"
|
||||
version = "0.12.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"bevy_embedded_assets",
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
[package]
|
||||
name = "outfly"
|
||||
version = "0.13.0-dev"
|
||||
version = "0.12.0"
|
||||
edition = "2021"
|
||||
homepage = "https://codeberg.org/outfly/outfly"
|
||||
repository = "https://codeberg.org/outfly/outfly"
|
||||
|
|
24
src/game.rs
24
src/game.rs
|
@ -619,9 +619,7 @@ fn check_achievements(
|
|||
}
|
||||
|
||||
fn handle_window_focus(
|
||||
mut local_paused: Local<bool>,
|
||||
mut settings: ResMut<Settings>,
|
||||
mut q_window: Query<&mut Window, With<PrimaryWindow>>,
|
||||
mut er_focus: EventReader<bevy::window::WindowFocused>,
|
||||
mut physicstime: ResMut<Time<Physics>>,
|
||||
) {
|
||||
|
@ -629,23 +627,9 @@ fn handle_window_focus(
|
|||
settings.window_focused = event.focused;
|
||||
}
|
||||
|
||||
let paused = !settings.is_game_running();
|
||||
|
||||
if paused != *local_paused {
|
||||
if paused {
|
||||
physicstime.pause();
|
||||
} else {
|
||||
physicstime.unpause();
|
||||
}
|
||||
|
||||
for mut window in &mut q_window {
|
||||
window.cursor.grab_mode = if paused {
|
||||
bevy::window::CursorGrabMode::None
|
||||
} else {
|
||||
bevy::window::CursorGrabMode::Locked
|
||||
};
|
||||
window.cursor.visible = paused;
|
||||
}
|
||||
*local_paused = paused;
|
||||
if settings.is_game_running() {
|
||||
physicstime.unpause();
|
||||
} else {
|
||||
physicstime.pause();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,14 +115,6 @@ fn main() {
|
|||
mode: bevy_embedded_assets::PluginMode::ReplaceDefault,
|
||||
});
|
||||
|
||||
// Reduce power usage when unfocused
|
||||
app.insert_resource(bevy::winit::WinitSettings {
|
||||
focused_mode: bevy::winit::UpdateMode::Continuous,
|
||||
unfocused_mode: bevy::winit::UpdateMode::reactive_low_power(
|
||||
bevy::utils::Duration::from_secs(10),
|
||||
),
|
||||
});
|
||||
|
||||
app.add_plugins(OutFlyPlugin);
|
||||
app.insert_resource(prefs);
|
||||
app.run();
|
||||
|
|
Loading…
Reference in a new issue