[][src]Trait caper::game::Update

pub trait Update {
    type T;
    fn update<F: FnMut(&Ui<'_>), U: FnMut(&mut Game<Self::T>) -> UpdateStatus>(
        &mut self,
        render_imgui: F,
        update: U,
        events: &Vec<Event<'_, ()>>
    ) -> UpdateStatus;
fn update_inputs(&mut self, events: &Vec<Event<'_, ()>>); }

Trait with default update definition

Associated Types

type T

RenderItem utype associated type

Loading content...

Required methods

fn update<F: FnMut(&Ui<'_>), U: FnMut(&mut Game<Self::T>) -> UpdateStatus>(
    &mut self,
    render_imgui: F,
    update: U,
    events: &Vec<Event<'_, ()>>
) -> UpdateStatus

Update the per frame engine state

fn update_inputs(&mut self, events: &Vec<Event<'_, ()>>)

Update the per frame inputs

Loading content...

Implementors

impl<T: Default> Update for Game<T>[src]

Impl for Update on Game

type T = T

Associated type for RenderItems

fn update<F: FnMut(&Ui<'_>), U: FnMut(&mut Game<T>) -> UpdateStatus>(
    &mut self,
    render_imgui: F,
    update: U,
    events: &Vec<Event<'_, ()>>
) -> UpdateStatus
[src]

Default Game implementation to update the engine state

fn update_inputs(&mut self, events: &Vec<Event<'_, ()>>)[src]

Default Game implementation to Update inputs

Loading content...