2023-12-21 22:02:59 +00:00
|
|
|
extern crate self as lyra_ecs;
|
|
|
|
|
2023-12-28 03:53:58 +00:00
|
|
|
#[allow(unused_imports)]
|
2023-12-27 04:48:46 +00:00
|
|
|
pub(crate) mod lyra_engine {
|
|
|
|
pub(crate) mod ecs {
|
|
|
|
pub use super::super::*;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-23 21:34:21 +00:00
|
|
|
use std::ops::BitOr;
|
|
|
|
|
2024-03-03 01:20:38 +00:00
|
|
|
mod archetype;
|
2023-12-01 04:05:06 +00:00
|
|
|
pub use archetype::*;
|
|
|
|
|
2024-03-03 01:20:38 +00:00
|
|
|
mod entity;
|
2024-02-23 21:34:21 +00:00
|
|
|
pub use entity::*;
|
|
|
|
|
2024-03-03 01:20:38 +00:00
|
|
|
mod world;
|
2023-12-01 04:05:06 +00:00
|
|
|
pub use world::*;
|
|
|
|
|
2024-03-03 01:20:38 +00:00
|
|
|
mod command;
|
2024-02-23 21:34:21 +00:00
|
|
|
pub use command::*;
|
|
|
|
|
2024-03-03 01:20:38 +00:00
|
|
|
mod bundle;
|
2023-12-01 04:05:06 +00:00
|
|
|
pub use bundle::*;
|
|
|
|
|
2024-03-03 01:20:38 +00:00
|
|
|
mod component;
|
2023-12-01 04:05:06 +00:00
|
|
|
pub use component::*;
|
|
|
|
|
2023-12-27 04:48:46 +00:00
|
|
|
pub mod query;
|
|
|
|
//pub use query::*;
|
2023-12-01 04:05:06 +00:00
|
|
|
|
2024-03-03 21:19:59 +00:00
|
|
|
pub mod relation;
|
2024-03-03 01:20:38 +00:00
|
|
|
pub use relation::Relation;
|
|
|
|
|
|
|
|
mod component_info;
|
2023-12-01 04:05:06 +00:00
|
|
|
pub use component_info::*;
|
|
|
|
|
2024-03-03 01:20:38 +00:00
|
|
|
mod resource;
|
2023-12-01 04:05:06 +00:00
|
|
|
pub use resource::*;
|
|
|
|
|
2023-12-27 04:48:46 +00:00
|
|
|
pub mod system;
|
|
|
|
//pub use system::*;
|
2023-12-04 04:14:27 +00:00
|
|
|
|
2024-03-03 01:20:38 +00:00
|
|
|
mod tick;
|
2023-12-26 19:12:53 +00:00
|
|
|
pub use tick::*;
|
|
|
|
|
2024-01-12 19:09:29 +00:00
|
|
|
/// 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::*;
|
|
|
|
|
2023-12-01 04:05:06 +00:00
|
|
|
#[cfg(test)]
|
2023-12-04 04:14:27 +00:00
|
|
|
mod tests;
|
|
|
|
|
|
|
|
#[derive(Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
|
|
|
|
pub enum Access {
|
2023-12-08 22:12:33 +00:00
|
|
|
None,
|
2023-12-04 04:14:27 +00:00
|
|
|
Read,
|
|
|
|
Write,
|
2024-02-23 21:34:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|