This commit is contained in:
2025-01-21 23:39:00 +00:00
parent bb3905e6b9
commit ca3fcc00ff
4 changed files with 52 additions and 49 deletions
+3 -3
View File
@@ -29,6 +29,7 @@ fn main() {
.add_plugins(FrameTimeDiagnosticsPlugin::default()) // Add the FrameTimeDiagnosticsPlugin here
.insert_resource(ClearColor(Color::srgb(0.0, 0.0, 0.0)))
.add_plugins(tilemap::TilemapPlugin)
.add_plugins(PathfindingPlugin)
.add_systems(
Startup,
(
@@ -41,8 +42,6 @@ fn main() {
FixedUpdate,
(
camera::camera_movement,
citizen::update_citizen_wandering_targets,
citizen::citizen_movement,
cursor::move_cursor,
// citizen::check_citizen_positions_for_chunks,
),
@@ -54,13 +53,14 @@ fn main() {
tile::camera_z_movement,
tile::update_tile_visibility
.run_if(|camera_moved: Res<tile::CameraMoved>| camera_moved.0),
log_fps_system,
// log_fps_system,
),
)
.run();
}
use bevy::diagnostic::DiagnosticsStore;
use citizen::PathfindingPlugin;
fn log_fps_system(diagnostics: Res<DiagnosticsStore>) {
if let Some(fps) = diagnostics