Move PlatformContext to the raidillon_platform crate
This commit is contained in:
parent
9905ffd26b
commit
369bbd19c7
8 changed files with 15 additions and 16 deletions
|
|
@ -1,13 +0,0 @@
|
|||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
use winit::event::Event;
|
||||
use raidillon_assets::{ModelManagerRef, ModelManager};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct PlatformContext {
|
||||
pub current_event: Event<()>,
|
||||
pub asset_manager: ModelManagerRef,
|
||||
pub frame_width: f32,
|
||||
pub frame_height: f32,
|
||||
}
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
use crate::context::PlatformContext;
|
||||
use crate::DebugUIBuffer;
|
||||
use crate::scene::Scene;
|
||||
|
||||
pub trait EngineTrait {
|
||||
type PlatformCtx: Clone;
|
||||
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 initialize(&mut self, platform_context: Self::PlatformCtx);
|
||||
fn update(&mut self, platform_context: Self::PlatformCtx);
|
||||
fn handle_event(&mut self, platform_context: Self::PlatformCtx);
|
||||
fn current_scene_mut(&mut self) -> &mut Scene;
|
||||
fn get_debug_ui_buffer(&self) -> Rc<RefCell<DebugUIBuffer>>;
|
||||
fn reset_debug_ui_buffer(&mut self);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
pub mod engine;
|
||||
pub mod scene;
|
||||
pub mod context;
|
||||
pub mod debug_ui;
|
||||
pub use debug_ui::*;
|
||||
Loading…
Add table
Add a link
Reference in a new issue