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::audio::{AudioPlugin, SpatialScale};
|
||||
use bevy::diagnostic::{DiagnosticsStore, FrameTimeDiagnosticsPlugin};
|
||||
use bevy::window::{PrimaryWindow, WindowMode};
|
||||
use input::Input;
|
||||
use prelude::*;
|
||||
|
@ -59,7 +58,7 @@ fn main() -> AppExit {
|
|||
..default()
|
||||
})
|
||||
.set(ImagePlugin::default_nearest()),
|
||||
FrameTimeDiagnosticsPlugin,
|
||||
bevy::diagnostic::FrameTimeDiagnosticsPlugin,
|
||||
bevy_framepace::FramepacePlugin,
|
||||
bevy_inspector_egui::quick::WorldInspectorPlugin::new(),
|
||||
));
|
||||
|
@ -162,7 +161,7 @@ fn update(
|
|||
view: Res<State<View>>,
|
||||
input: Res<Input>,
|
||||
mut next_state: ResMut<NextState<crate::View>>,
|
||||
diagnostics: Res<DiagnosticsStore>,
|
||||
diagnostics: Res<bevy::diagnostic::DiagnosticsStore>,
|
||||
mut query: Query<&mut Text, With<FpsText>>,
|
||||
mut window: Query<&mut Window, With<PrimaryWindow>>,
|
||||
keys: Res<ButtonInput<KeyCode>>,
|
||||
|
@ -200,7 +199,7 @@ fn update(
|
|||
}
|
||||
}
|
||||
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() {
|
||||
text.sections[1].value = format!("{value:.2}");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue