Trait rinecs::component::NToOneComponent[][src]

pub trait NToOneComponent<'a>: 'static + Sized + Component + Deref<Target = Entity> { }

N to One components are just references to other entities.

That way several entities can have the same components in common.

#[derive(NToOneComponent, Debug)]
struct ComponentRef(Entity);

Automatically implements NToOneComponent and can be used with ReadRef and Ref.

Implementors

Loading content...