-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
started removal of bevy_ecs in favor of hecs
- Loading branch information
Showing
11 changed files
with
152 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
use bevy_ecs::world::World; | ||
use winit::{event::ElementState, keyboard::KeyCode}; | ||
|
||
#[allow(unused_variables)] | ||
pub trait App { | ||
fn config(&self) -> AppConfig; | ||
|
||
fn start(&mut self, world: &mut World) {} | ||
fn input(&mut self, world: &mut World, keycode: &KeyCode, key_state: &ElementState) {} | ||
fn mouse_moved(&mut self, world: &mut World, delta: (f64, f64)) {} | ||
} | ||
use crate::EngineResources; | ||
|
||
#[derive(Debug)] | ||
pub struct AppConfig { | ||
pub update_dt: f32, | ||
pub cursor_locked: bool, | ||
pub cursor_visible: bool, | ||
pub trait App { | ||
fn start(&mut self, resources: &mut EngineResources); | ||
fn mouse_moved(&mut self, resources: &mut EngineResources, delta: (f64, f64)); | ||
fn input(&mut self, | ||
resources: &mut EngineResources, | ||
keycode: &KeyCode, | ||
key_state: &ElementState | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.