[][src]Trait ngen::Simulation

pub trait Simulation {
    fn update(
        &mut self,
        platform: &mut Platform<'_>,
        input: &Input,
        tick: Tick
    ) -> Result<bool, String>;
fn render(
        &mut self,
        render_commands: &mut RenderCommands
    ) -> Result<(), String>; }

A trait describing a simulation.

Required methods

fn update(
    &mut self,
    platform: &mut Platform<'_>,
    input: &Input,
    tick: Tick
) -> Result<bool, String>

The update method that is called every simulation frame.

fn render(&mut self, render_commands: &mut RenderCommands) -> Result<(), String>

The render method that is called every render frame.

Loading content...

Implementors

Loading content...