Integration of ECS pattern: Iteration 1
This commit is contained in:
parent
fc81f65a27
commit
8ce620a74b
13 changed files with 727 additions and 135 deletions
|
@ -1,5 +1,6 @@
|
|||
use std::error::Error;
|
||||
|
||||
use bevy_ecs::world::World;
|
||||
use vulkano::sync::GpuFuture;
|
||||
|
||||
use crate::core::app::context::WindowContext;
|
||||
|
@ -8,12 +9,21 @@ pub mod manager;
|
|||
|
||||
pub trait Scene {
|
||||
fn loaded(&self) -> bool;
|
||||
fn load(&mut self, app_context: &mut WindowContext) -> Result<(), Box<dyn Error>>;
|
||||
fn update(&mut self, app_context: &mut WindowContext) -> Result<(), Box<dyn Error>>;
|
||||
fn load(
|
||||
&mut self,
|
||||
world: &mut World,
|
||||
window_context: &mut WindowContext,
|
||||
) -> Result<(), Box<dyn Error>>;
|
||||
fn update(
|
||||
&mut self,
|
||||
world: &mut World,
|
||||
window_context: &WindowContext,
|
||||
) -> Result<(), Box<dyn Error>>;
|
||||
fn render(
|
||||
&mut self,
|
||||
acquire_future: Box<dyn GpuFuture>,
|
||||
app_context: &mut WindowContext,
|
||||
world: &mut World,
|
||||
window_context: &mut WindowContext,
|
||||
) -> Result<Box<dyn GpuFuture>, Box<dyn Error>>;
|
||||
fn unload(&mut self);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue