Skip to main content

Game

Trait Game 

Source
pub trait Game {
Show 15 methods // Required method fn start(&mut self, world: &mut World); // Provided methods fn actions(&self) -> Vec<ActionSpec> { ... } fn tick(&mut self, _world: &mut World, _tick: &Tick, _input: &Input) { ... } fn try_tick( &mut self, world: &mut World, tick: &Tick, input: &Input, ) -> Result<(), Box<dyn Error + Send + Sync>> { ... } fn events(&mut self, _world: &mut World, _events: &[WorldEvent]) { ... } fn animated(&mut self, _world: &mut World, _events: &[AnimationEvent]) { ... } fn frame(&mut self, _world: &World, _alpha: f32) { ... } fn try_frame( &mut self, world: &World, time: FrameTime, ) -> Result<(), Box<dyn Error + Send + Sync>> { ... } fn ui(&mut self, _world: &World, _frame: &UiFrame) -> Ui { ... } fn warm( &mut self, _warm: &mut Warm<'_>, ) -> Result<Warming, Box<dyn Error + Send + Sync>> { ... } fn paint( &mut self, _renderer: &mut Renderer, _target: &TextureView, _frame: &PaintFrame, ) -> Result<(), Box<dyn Error + Send + Sync>> { ... } fn try_ui( &mut self, world: &World, frame: &UiFrame, ) -> Result<Ui, Box<dyn Error + Send + Sync>> { ... } fn settings(&self) -> Option<&Settings> { ... } fn stop(&mut self) { ... } fn modules(&mut self) -> Option<&mut dyn Reload> { ... }
}

Required Methods§

Source

fn start(&mut self, world: &mut World)

Provided Methods§

Source

fn actions(&self) -> Vec<ActionSpec>

Source

fn tick(&mut self, _world: &mut World, _tick: &Tick, _input: &Input)

Source

fn try_tick( &mut self, world: &mut World, tick: &Tick, input: &Input, ) -> Result<(), Box<dyn Error + Send + Sync>>

Source

fn events(&mut self, _world: &mut World, _events: &[WorldEvent])

Source

fn animated(&mut self, _world: &mut World, _events: &[AnimationEvent])

Source

fn frame(&mut self, _world: &World, _alpha: f32)

Source

fn try_frame( &mut self, world: &World, time: FrameTime, ) -> Result<(), Box<dyn Error + Send + Sync>>

Source

fn ui(&mut self, _world: &World, _frame: &UiFrame) -> Ui

Source

fn warm( &mut self, _warm: &mut Warm<'_>, ) -> Result<Warming, Box<dyn Error + Send + Sync>>

Source

fn paint( &mut self, _renderer: &mut Renderer, _target: &TextureView, _frame: &PaintFrame, ) -> Result<(), Box<dyn Error + Send + Sync>>

Source

fn try_ui( &mut self, world: &World, frame: &UiFrame, ) -> Result<Ui, Box<dyn Error + Send + Sync>>

Source

fn settings(&self) -> Option<&Settings>

Source

fn stop(&mut self)

Source

fn modules(&mut self) -> Option<&mut dyn Reload>

Implementors§