Cleanup
This commit is contained in:
parent
209b25c29f
commit
4d5f9be124
|
@ -9,7 +9,6 @@ mod statue;
|
||||||
|
|
||||||
use bevy::asset::load_internal_binary_asset;
|
use bevy::asset::load_internal_binary_asset;
|
||||||
use bevy::audio::{AudioPlugin, SpatialScale};
|
use bevy::audio::{AudioPlugin, SpatialScale};
|
||||||
use bevy::diagnostic::{DiagnosticsStore, FrameTimeDiagnosticsPlugin};
|
|
||||||
use bevy::window::{PrimaryWindow, WindowMode};
|
use bevy::window::{PrimaryWindow, WindowMode};
|
||||||
use input::Input;
|
use input::Input;
|
||||||
use prelude::*;
|
use prelude::*;
|
||||||
|
@ -59,7 +58,7 @@ fn main() -> AppExit {
|
||||||
..default()
|
..default()
|
||||||
})
|
})
|
||||||
.set(ImagePlugin::default_nearest()),
|
.set(ImagePlugin::default_nearest()),
|
||||||
FrameTimeDiagnosticsPlugin,
|
bevy::diagnostic::FrameTimeDiagnosticsPlugin,
|
||||||
bevy_framepace::FramepacePlugin,
|
bevy_framepace::FramepacePlugin,
|
||||||
bevy_inspector_egui::quick::WorldInspectorPlugin::new(),
|
bevy_inspector_egui::quick::WorldInspectorPlugin::new(),
|
||||||
));
|
));
|
||||||
|
@ -162,7 +161,7 @@ fn update(
|
||||||
view: Res<State<View>>,
|
view: Res<State<View>>,
|
||||||
input: Res<Input>,
|
input: Res<Input>,
|
||||||
mut next_state: ResMut<NextState<crate::View>>,
|
mut next_state: ResMut<NextState<crate::View>>,
|
||||||
diagnostics: Res<DiagnosticsStore>,
|
diagnostics: Res<bevy::diagnostic::DiagnosticsStore>,
|
||||||
mut query: Query<&mut Text, With<FpsText>>,
|
mut query: Query<&mut Text, With<FpsText>>,
|
||||||
mut window: Query<&mut Window, With<PrimaryWindow>>,
|
mut window: Query<&mut Window, With<PrimaryWindow>>,
|
||||||
keys: Res<ButtonInput<KeyCode>>,
|
keys: Res<ButtonInput<KeyCode>>,
|
||||||
|
@ -200,7 +199,7 @@ fn update(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for mut text in &mut query {
|
for mut text in &mut query {
|
||||||
if let Some(fps) = diagnostics.get(&FrameTimeDiagnosticsPlugin::FPS) {
|
if let Some(fps) = diagnostics.get(&bevy::diagnostic::FrameTimeDiagnosticsPlugin::FPS) {
|
||||||
if let Some(value) = fps.smoothed() {
|
if let Some(value) = fps.smoothed() {
|
||||||
text.sections[1].value = format!("{value:.2}");
|
text.sections[1].value = format!("{value:.2}");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue