nightshade 0.13.2

A cross-platform data-oriented game engine.
Documentation
#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct RenderLayer(pub u32);

impl Default for RenderLayer {
    fn default() -> Self {
        Self(Self::WORLD)
    }
}

impl RenderLayer {
    pub const WORLD: u32 = 0;
    pub const OVERLAY: u32 = 1;

    pub fn new(layer: u32) -> Self {
        Self(layer)
    }

    pub fn is_in_layer(&self, layer: u32) -> bool {
        self.0 == layer
    }

    pub fn is_overlay(&self) -> bool {
        self.0 == Self::OVERLAY
    }
}