pub use self::entity::{EntitySystem, EntityProcess};
pub use self::interact::{InteractSystem, InteractProcess};
pub use self::interval::{IntervalSystem};
use EntityData;
use ComponentManager;
use DataHelper;
pub mod entity;
pub mod interact;
pub mod interval;
pub trait System: 'static
{
type Components: ComponentManager;
fn activated(&mut self, _: &EntityData, _: &Self::Components)
{
}
fn reactivated(&mut self, e: &EntityData, c: &Self::Components)
{
self.deactivated(e, c);
self.activated(e, c);
}
fn deactivated(&mut self, _: &EntityData, _: &Self::Components)
{
}
fn is_active(&self) -> bool
{
true
}
}
pub trait Process: System
{
fn process(&mut self, &mut DataHelper<<Self as System>::Components>);
}