pub struct App {
pub window: Window,
pub world: World,
pub dispatcher: Dispatcher<'static, 'static>,
pub scenes: Vec<Scene>,
pub component_registry: ComponentRegistry,
}Expand description
The application struct which contains fennel_core::Window, specs::World and specs
Dispatcher
Fields§
§window: WindowResponsible for GFX and audio
world: WorldECS world
dispatcher: Dispatcher<'static, 'static>ECS dispatcher
scenes: Vec<Scene>Application scenes
component_registry: ComponentRegistryRegistry of component factories for scene drawing
Implementations§
Trait Implementations§
Source§impl WindowEventHandler for App
impl WindowEventHandler for App
fn update(&self, _window: &mut Window) -> Result<()>
fn draw(&mut self, window: &mut Window) -> Result<()>
fn key_down_event( &self, _window: &mut Window, event: KeyboardEvent, ) -> Result<()>
fn key_up_event( &self, _window: &mut Window, _event: KeyboardEvent, ) -> Result<(), Error>
fn mouse_motion_event( &self, _window: &mut Window, _event: MouseMotionEvent, ) -> Result<(), Error>
fn mouse_wheel_event( &self, _window: &mut Window, _event: MouseWheelEvent, ) -> Result<(), Error>
impl Send for App
impl Sync for App
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more