[−][src]Trait ytesrev::scene::Scene
A scene is like a Drawable
, but without the modularity, it's in the top level and
no wrappers for it exists. Unless you're doing something advanced, a
DrawableWrapper
around your Drawable
s should do fine.
Required methods
fn update(&mut self, _dt: f64)
Do a tick
fn draw(&self, canvas: &mut Canvas<Window>, settings: DrawSettings)
Draw the content of this scene to a Canvas
.
fn event(&mut self, _event: YEvent)
Called when an event occured
fn action(&self) -> Action
What to do
fn register(&mut self)
Register everything. The scene equivalent of Drawable::register
fn load(&mut self)
Load everything. The scene equivalent of Drawable::load