optimize path finding

This commit is contained in:
2024-10-12 12:48:14 -04:00
parent 06ffb2bd3e
commit 3531f9f68f
7 changed files with 117 additions and 37 deletions

View File

@@ -24,7 +24,12 @@ fn update_tile_under_cursor(
map: Res<Map>,
mut tile_under_cursor: ResMut<TileUnderCursor>,
) {
let win = window.single();
let win_r = window.get_single();
if win_r.is_err() {
return;
}
let win = win_r.unwrap();
let (cam_transform, camera) = cam_query.single();
let Some(cursor_pos) = win.cursor_position() else {
return;