summaryrefslogtreecommitdiff
path: root/src/systems/clear.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-04-04 23:48:07 +0200
committertroido <troido@protonmail.com>2020-04-04 23:48:07 +0200
commit068f98cec100772defce8ba966e5b917558b191c (patch)
tree80124cf89852dbedec9322258af36167cc99277b /src/systems/clear.rs
parent2cc5b468cfd4c28bf1ad17ef1b3600c3d42f8b83 (diff)
draw the room after new entities have been added
Diffstat (limited to 'src/systems/clear.rs')
-rw-r--r--src/systems/clear.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/systems/clear.rs b/src/systems/clear.rs
new file mode 100644
index 0000000..64588d3
--- /dev/null
+++ b/src/systems/clear.rs
@@ -0,0 +1,19 @@
+
+use specs::{
+ Write,
+ System
+};
+
+use crate::{
+ resources::Ground
+};
+
+pub struct Clear;
+impl <'a> System<'a> for Clear {
+ type SystemData =
+ Write<'a, Ground>;
+ fn run(&mut self, mut ground: Self::SystemData) {
+ ground.changes.clear();
+ }
+}
+