Add per-event handling to systems

This commit is contained in:
Emre Osmanoğlu 2025-09-10 15:03:49 +03:00
parent 0c0d5cdb2a
commit ee2999a0d5
5 changed files with 95 additions and 78 deletions

View file

@ -1,13 +1,14 @@
use crate::DebugUIBuffer;
use crate::context::PlatformContext;
use crate::scene::Scene;
use std::cell::RefCell;
use std::rc::Rc;
use crate::context::PlatformContext;
use crate::DebugUIBuffer;
use crate::scene::Scene;
pub trait EngineTrait {
fn new() -> Self;
fn initialize(&mut self, platform_context: PlatformContext);
fn update(&mut self, platform_context: PlatformContext);
fn handle_event(&mut self, platform_context: PlatformContext);
fn current_scene_mut(&mut self) -> &mut Scene;
fn get_debug_ui_buffer(&self) -> Rc<RefCell<DebugUIBuffer>>;
fn reset_debug_ui_buffer(&mut self);