summaryrefslogtreecommitdiff
path: root/src/systems/clear.rs
blob: 8d158351b91f05ee2aeb3676fa4c75ced545ecfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

use specs::{
	Write,
	WriteStorage,
	System
};

use crate::{
	resources::Ground,
	components::TriggerBox
};

pub struct Clear;
impl <'a> System<'a> for Clear {
	type SystemData = (
		Write<'a, Ground>,
		WriteStorage<'a, TriggerBox>
	);
	fn run(&mut self, (mut ground, mut triggerboxes): Self::SystemData) {
		ground.changes.clear();
		triggerboxes.clear();
	}
}