1 2 3 4 5 6 7 8 9 10 11 12 13
pub trait Layer { fn init(&mut self, _app_context: &mut crate::AppContext) {} fn on_event( &mut self, _event: &glutin::event::Event<()>, _app_context: &mut crate::AppContext, ) { } fn on_fixed_update(&mut self, _app_context: &mut crate::AppContext) {} fn on_frame_update(&mut self, _app_context: &mut crate::AppContext) {} fn on_imgui_update(&mut self, _ui: &imgui::Ui, _app_context: &mut crate::AppContext) {} fn name(&self) -> &String; }