Trait GameLoop

Source
pub trait GameLoop: Sized {
    // Required methods
    fn new(c: &mut EngineState) -> Self;
    fn update(&mut self, c: &mut EngineContext<'_>);

    // Provided method
    fn performance_metrics(&self, _world: &mut World, _ui: &mut Ui) { ... }
}

Required Methods§

Source

fn new(c: &mut EngineState) -> Self

Source

fn update(&mut self, c: &mut EngineContext<'_>)

Provided Methods§

Source

fn performance_metrics(&self, _world: &mut World, _ui: &mut Ui)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§