/// Creates a `BaseEntityData` for the given entity.
Creates a `BaseEntityData` for the given entity.
Creates a ` BaseEntityData ` for the given entity .
pub fn base_data(world: &World, entity: Entity) -> BaseEntityData {
    let position = world
        .read_component::<PositionComponent>()
        .get(entity)
        .copied()
        .unwrap_or_default();
    let velocity = world
        .read_component::<VelocityComponent>()
        .get(entity)
        .copied()
        .unwrap_or_default();
    BaseEntityData::new(position.current, velocity.0)
}
pub fn base_data ( world : & World , entity : Entity ) -> BaseEntityData { let position = world . read_component :: < PositionComponent > ( ) . get ( entity ) . copied ( ) . unwrap_or_default ( ) ; let velocity = world . read_component :: < VelocityComponent > ( ) . get ( entity ) . copied ( ) . unwrap_or_default ( ) ; BaseEntityData :: new ( position . current , velocity . 0 ) }
Creates a `BaseEntityData` for the given entity.
Creates a ` BaseEntityData ` for the given entity .
world
&World
entity
Entity