summaryrefslogtreecommitdiff
path: root/src/systems/clear.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-04-13 14:16:35 +0200
committertroido <troido@protonmail.com>2020-04-13 14:16:35 +0200
commitee200f3003acdfdfde1a746246a7a4669188eb18 (patch)
treeb15ac6b53f52e72b586c529fba550368e1ca6f68 /src/systems/clear.rs
parentab67714238c162646af10334715c6de41939c83f (diff)
spawners now also use timer component and triggers
Diffstat (limited to 'src/systems/clear.rs')
-rw-r--r--src/systems/clear.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/systems/clear.rs b/src/systems/clear.rs
index 64588d3..8d15835 100644
--- a/src/systems/clear.rs
+++ b/src/systems/clear.rs
@@ -1,19 +1,24 @@
use specs::{
Write,
+ WriteStorage,
System
};
use crate::{
- resources::Ground
+ resources::Ground,
+ components::TriggerBox
};
pub struct Clear;
impl <'a> System<'a> for Clear {
- type SystemData =
- Write<'a, Ground>;
- fn run(&mut self, mut ground: Self::SystemData) {
+ type SystemData = (
+ Write<'a, Ground>,
+ WriteStorage<'a, TriggerBox>
+ );
+ fn run(&mut self, (mut ground, mut triggerboxes): Self::SystemData) {
ground.changes.clear();
+ triggerboxes.clear();
}
}