use flecs::*;
struct Eats {}
fn main() {
println!("Entity Relations starting...");
let mut world = World::new();
let eats_id = world.component_named::<Eats>("Eats");
let grows = world.entity().named("Grows");
let apples = world.entity().named("Apples");
let pears = world.entity().named("Pears");
let bob = world
.entity()
.named("Bob")
.add_relation_ids(eats_id, apples)
.add_relation_ids(grows, pears);
println!("Bob eats apples? {}", bob.has_relation(eats_id, apples));
println!("Bob grows food? {}", bob.has_relation_wildcard(grows));
println!("Bob's type: [ {} ]", bob.type_info().to_str());
}
#[cfg(test)]
mod tests {
#[test]
fn flecs_entity_relations() {
super::main();
}
}