diff options
author | Tom Barrett <tom@tombarrett.xyz> | 2021-04-04 12:47:43 +0200 |
---|---|---|
committer | Tom Barrett <tom@tombarrett.xyz> | 2021-04-04 12:47:43 +0200 |
commit | f98dcf9582418de9c4dc888ca78e88f4c0471be8 (patch) | |
tree | 976cd30278260d110f40a6f6f795848a896503cb /src/cell.rs | |
parent | 23ba31868d99f17f2736d57d9a0f7a0eec0a5415 (diff) |
good start, but seem to have an issue with queries connecting cells and textureatlassprite, their iters are always empty
Diffstat (limited to 'src/cell.rs')
-rw-r--r-- | src/cell.rs | 6 |
1 files changed, 4 insertions, 2 deletions
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<Timer>>) { +pub fn start_explosion(mut commands: Commands, mut q: Query<(Entity, &Cell), Without<Timer>>) { 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)); } } } |