From 67f3c14b7a13420b418c8ada9aea266d923b6896 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 7 Mar 2024 11:55:05 +0100 Subject: [PATCH] Add a convenience helper for reading GridCell and Transform from a query at the same time (#12) Co-authored-by: Oliver Scherer Co-authored-by: Aevyrie --- examples/demo.rs | 12 +++-- src/camera.rs | 37 ++++++++------- src/grid_cell.rs | 7 +++ src/lib.rs | 26 +++++------ src/world_query.rs | 109 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 158 insertions(+), 33 deletions(-) create mode 100644 src/world_query.rs diff --git a/examples/demo.rs b/examples/demo.rs index f7b82e0..7396c19 100644 --- a/examples/demo.rs +++ b/examples/demo.rs @@ -5,6 +5,7 @@ use bevy::{ }; use big_space::{ camera::{CameraController, CameraInput}, + world_query::GridTransformReadOnly, FloatingOrigin, GridCell, }; @@ -153,14 +154,17 @@ fn ui_text_system( mut debug_text: Query<&mut Text, (With, Without)>, mut fun_text: Query<&mut Text, (With, Without)>, time: Res