pub trait Scene {
// Required methods
fn new() -> Self
where Self: Sized;
fn enter(&mut self);
fn update(&mut self, canvas: &mut Canvas, ctx: &mut GameContext<'_>);
fn fixed_update(&mut self, canvas: &mut Canvas, ctx: &mut GameContext<'_>);
fn exit(&mut self);
}
Expand description
Trait to represent a scene in the Game
.