lyra-engine/lyra-ecs/src/lib.rs

73 lines
1.2 KiB
Rust
Raw Normal View History

2023-12-21 22:02:59 +00:00
extern crate self as lyra_ecs;
#[allow(unused_imports)]
pub(crate) mod lyra_engine {
pub(crate) mod ecs {
pub use super::super::*;
}
}
pub mod archetype;
use std::ops::BitOr;
pub use archetype::*;
pub mod entity;
pub use entity::*;
pub mod world;
pub use world::*;
pub mod command;
pub use command::*;
pub mod bundle;
pub use bundle::*;
pub mod component;
pub use component::*;
pub mod query;
//pub use query::*;
pub mod component_info;
pub use component_info::*;
pub mod resource;
pub use resource::*;
pub mod system;
//pub use system::*;
2023-12-04 04:14:27 +00:00
pub mod tick;
2023-12-26 19:12:53 +00:00
pub use tick::*;
/// Implements Component for glam math types
#[cfg(feature = "math")]
pub mod math;
2023-12-21 22:02:59 +00:00
pub use lyra_ecs_derive::*;
#[cfg(test)]
2023-12-04 04:14:27 +00:00
mod tests;
#[derive(Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub enum Access {
None,
2023-12-04 04:14:27 +00:00
Read,
Write,
}
impl BitOr for Access {
type Output = Access;
fn bitor(self, rhs: Self) -> Self::Output {
if self == Access::Write || rhs == Access::Write {
Access::Write
} else if self == Access::Read || rhs == Access::Read {
Access::Read
} else {
Access::None
}
}
2023-12-04 04:14:27 +00:00
}