From f98dcf9582418de9c4dc888ca78e88f4c0471be8 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Sun, 4 Apr 2021 12:47:43 +0200 Subject: good start, but seem to have an issue with queries connecting cells and textureatlassprite, their iters are always empty --- src/cell.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/cell.rs') diff --git a/src/cell.rs b/src/cell.rs index 51b68e8..b697076 100644 --- a/src/cell.rs +++ b/src/cell.rs @@ -76,10 +76,12 @@ pub fn insert(mut q: Query<(&mut Cell, &mut TextureAtlasSprite)>) { } } -pub fn start_explosion(commands: &mut Commands, mut q: Query<(Entity, &Cell), Without>) { +pub fn start_explosion(mut commands: Commands, mut q: Query<(Entity, &Cell), Without>) { for (entity, cell) in q.iter_mut() { if cell.occupant == Occupant::Explosion { - commands.insert(entity, (Timer::from_seconds(0.1, true),)); + commands + .entity(entity) + .insert(Timer::from_seconds(0.1, true)); } } } -- cgit v1.2.3