summaryrefslogtreecommitdiff
path: root/src/systems/volate.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-04-13 13:13:04 +0200
committertroido <troido@protonmail.com>2020-04-13 13:13:04 +0200
commitdb7b138cb66a2b48492e457fdf0ae8cd65cc73db (patch)
tree048e7931d0c7055ebdc7ce5b8f5083cc62154336 /src/systems/volate.rs
parent56f44d5898696d1af50f38009629384f8d38cb46 (diff)
volate replaced by grow
Diffstat (limited to 'src/systems/volate.rs')
-rw-r--r--src/systems/volate.rs34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/systems/volate.rs b/src/systems/volate.rs
deleted file mode 100644
index cd50995..0000000
--- a/src/systems/volate.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-
-use specs::{
- Read,
- WriteStorage,
- Entities,
- System,
- Join
-};
-
-use crate::{
- components::{Volatile, Removed},
- resources::Time
-};
-
-pub struct Volate;
-impl <'a> System<'a> for Volate {
- type SystemData = (
- Entities<'a>,
- WriteStorage<'a, Volatile>,
- WriteStorage<'a, Removed>,
- Read<'a, Time>
- );
- fn run(&mut self, (entities, mut volatiles, mut removals, timestamp): Self::SystemData) {
- for (ent, volatile) in (&entities, &mut volatiles).join() {
- if let Some(time) = volatile.end_time {
- if time <= timestamp.time {
- removals.insert(ent, Removed).unwrap();
- }
- } else {
- volatile.end_time = Some(timestamp.time + volatile.delay);
- }
- }
- }
-}