shipyard 0.5.0

Entity Component System
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use shipyard::*;

#[rustfmt::skip]
#[allow(unused)]
#[test]
fn insertion() {
// ANCHOR: insertion
let mut world = World::new();

let entity0 = world.add_entity((0u32,));
let entity1 = world.add_entity((10.0f32,));
let entity2 = world.add_entity((20u32,));
// ANCHOR_END: insertion

// ANCHOR: removal
world.remove::<(u32,)>(entity0);
// ANCHOR_END: removal
}