logo

Trait primitives::prelude::Kernel[][src]

pub trait Kernel: Pauseable + Logger {
Show 17 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

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

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

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

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

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

Assets manager.

Audio manager.

Inputs manager.

Scene manager. State machine containing Entities.

Helper methods.

Build properties and factory methods to create the application.

Read and write globally accessible variables.

Request the framerate of the application.

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

Return: Frames per second.

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

Arguments

Implementors