corrosive-ecs-core 0.1.0

Core Functionality of Corrosive Engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::collections::HashSet;

/// Used to trigger signals.
/// Can be used as task outputs.
/// Signals can be used as conditions in `corrosive_app_builder!`
#[derive(Default)]
pub struct Signal {
    vec: HashSet<String>,
}
impl Signal {
    /// Will trigger a certain signal.
    pub fn trigger(&mut self, signal: &str) {
        self.vec.insert(signal.to_string());
    }
}