Shipyard is an Entity Component System. While it's usable it is far from finished.
World
will do the rest.```rust use shipyard::*;
struct Health(f32); struct Position { x: f32, y: f32 };
struct InAcid;
impl<'a> System<'a> for InAcid {
type Data = (&'a Position, &'a mut Health);
fn run(&self, (pos, mut health):
fn isinacid(pos: &Position) -> bool { // well... it's wet season
true
}
let world = World::default();
world.new_entity((Position { x: 0.0, y: 0.0 }, Health(1000.0)));
world.addworkload("In acid", InAcid); world.rundefault(); ```
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.