[−][src]Trait simple_game_engine::Application
An application using this framework.
Required methods
pub fn on_update(
&mut self,
canvas: &mut WindowCanvas,
input: &InputState,
elapsed_time: f64
) -> UpdateResult[src]
&mut self,
canvas: &mut WindowCanvas,
input: &InputState,
elapsed_time: f64
) -> UpdateResult
Called once per frame.
Parameters
canvas: A draw target representing the visible window.elapsed_time: Duration (in seconds) since the last frame. This can be used to keep time-sensative routines, such as animation, running at a constant speed.
Provided methods
pub fn on_quit(&mut self) -> Result<(), Box<dyn Error>>[src]
Called when the window's close button is clicked.
Be aware that this isn't called on std::process::exit, so do any essential
cleanup in a Drop implementation instead.
Does nothing by default.