Kernel

Trait Kernel 

Source
pub trait Kernel: Pauseable + Logger {
Show 17 methods // Required methods fn is_debug(&self) -> bool; fn is_local(&self) -> bool; fn is_eyecandy(&self) -> bool; fn set_eyecandy(&self, val: bool); fn is_fullscreen(&self) -> bool; fn set_fullscreen(&self, val: bool); fn overlay(&self) -> Box<dyn Overlay>; fn assets(&self) -> Box<dyn AssetManager>; fn audio(&self) -> Box<dyn AudioManager>; fn inputs(&self) -> Box<dyn InputManager>; fn scenes(&self) -> Box<dyn SceneManager>; fn tools(&self) -> Box<dyn Tools>; fn factory(&self) -> Box<dyn EngineFactory>; fn session(&self) -> Box<dyn Session>; fn set_session(&self, val: Box<dyn Session>); fn get_framerate(&self, as_actual: Option<bool>) -> f32; fn on_preloader_complete(&self, preloader: Box<dyn Preloader>);
}
Expand description

Handles main updates and provides global locators for all managers

Required Methods§

Source

fn is_debug(&self) -> bool

Defined by the EngineFactory, can be used for conditional logic relating to build modes and debug.

Source

fn is_local(&self) -> bool

Identifies a non network location, can be used for conditional logic relating to build modes and debug.

Source

fn is_eyecandy(&self) -> bool

Toggleable by the user, intended to be used as a switch to disable intensive, but non essential, content (performance vs wow).

Source

fn set_eyecandy(&self, val: bool)

Toggle eyecandy

Source

fn is_fullscreen(&self) -> bool

Toggleable by the user, enables or disables full screen mode.

Source

fn set_fullscreen(&self, val: bool)

Toggle fullscreen

Source

fn overlay(&self) -> Box<dyn Overlay>

The topmost visual element, used for chrome & global controls.

Source

fn assets(&self) -> Box<dyn AssetManager>

Assets manager.

Source

fn audio(&self) -> Box<dyn AudioManager>

Audio manager.

Source

fn inputs(&self) -> Box<dyn InputManager>

Inputs manager.

Source

fn scenes(&self) -> Box<dyn SceneManager>

Scene manager. State machine containing Entities.

Source

fn tools(&self) -> Box<dyn Tools>

Helper methods.

Source

fn factory(&self) -> Box<dyn EngineFactory>

Build properties and factory methods to create the application.

Source

fn session(&self) -> Box<dyn Session>

Read and write globally accessible variables.

Source

fn set_session(&self, val: Box<dyn Session>)

Set session variables

Source

fn get_framerate(&self, as_actual: Option<bool>) -> f32

Request the framerate of the application.

§Arguments
  • asActual - Use actual framerate (potentially laggy), or the desired framerate (from EngineFactory). (optional: default: true)

Return: Frames per second.

Source

fn on_preloader_complete(&self, preloader: Box<dyn Preloader>)

Internal method called when preloader completes; launches the starting scene as defined by EngineFactory::starting_scene_type.

§Arguments

Implementors§