pkecs 9.0.0

Another ECS implementation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Contains types for scaffolding an application.

use crate::ecs::{event::Events, system::Systems};

/// Provides a single entrypoint for injecting functionality into an application.
pub trait Plugin {
    fn attach(self, events: &mut Events, systems: &mut Systems);
}

impl<F> Plugin for F
    where
        F: FnOnce(&mut Events, &mut Systems),
{
    fn attach(self, events: &mut Events, systems: &mut Systems) {
        (self)(events, systems);
    }
}