pub trait ShellHooks {
// Required method
fn frame_input(&mut self, sim: &Sim) -> FrameInput;
// Provided method
fn on_frame(&mut self, _sim: &mut Sim, _dt: Duration) { ... }
}Expand description
Per-frame hooks the game implements.
Required Methods§
Sourcefn frame_input(&mut self, sim: &Sim) -> FrameInput
fn frame_input(&mut self, sim: &Sim) -> FrameInput
Build this frame’s viewport snapshot from sim and UI state.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".