game::layer

Trait Layer

Source
pub trait Layer {
    // Required methods
    fn name(&self) -> Option<&'static str>;
    fn event(
        &mut self,
        ctx: &mut EventCtx<'_>,
        app: &mut App,
    ) -> Option<LayerOutcome>;
    fn draw(&self, g: &mut GfxCtx<'_>, app: &App);
    fn draw_minimap(&self, g: &mut GfxCtx<'_>);
}

Required Methods§

Source

fn name(&self) -> Option<&'static str>

Source

fn event( &mut self, ctx: &mut EventCtx<'_>, app: &mut App, ) -> Option<LayerOutcome>

Source

fn draw(&self, g: &mut GfxCtx<'_>, app: &App)

Source

fn draw_minimap(&self, g: &mut GfxCtx<'_>)

Implementations§

Source§

impl dyn Layer

Source

fn simple_event( ctx: &mut EventCtx<'_>, panel: &mut Panel, ) -> Option<LayerOutcome>

Implementors§