pass run_state instead of time to TestbedPlugin::run_callbacks
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
use crate::physics::PhysicsState;
|
use crate::physics::PhysicsState;
|
||||||
use kiss3d::window::Window;
|
use kiss3d::window::Window;
|
||||||
use na::Point3;
|
use na::Point3;
|
||||||
|
use crate::harness::RunState;
|
||||||
|
|
||||||
pub trait TestbedPlugin {
|
pub trait TestbedPlugin {
|
||||||
fn init_graphics(&mut self, window: &mut Window, gen_color: &mut dyn FnMut() -> Point3<f32>);
|
fn init_graphics(&mut self, window: &mut Window, gen_color: &mut dyn FnMut() -> Point3<f32>);
|
||||||
fn clear_graphics(&mut self, window: &mut Window);
|
fn clear_graphics(&mut self, window: &mut Window);
|
||||||
fn run_callbacks(&mut self, window: &mut Window, physics: &mut PhysicsState, t: f32);
|
fn run_callbacks(&mut self, window: &mut Window, physics: &mut PhysicsState, run_state: &RunState);
|
||||||
fn step(&mut self, physics: &mut PhysicsState);
|
fn step(&mut self, physics: &mut PhysicsState);
|
||||||
fn draw(&mut self);
|
fn draw(&mut self);
|
||||||
fn profiling_string(&self) -> String;
|
fn profiling_string(&self) -> String;
|
||||||
|
|||||||
@@ -1310,7 +1310,7 @@ impl State for Testbed {
|
|||||||
plugin.run_callbacks(
|
plugin.run_callbacks(
|
||||||
window,
|
window,
|
||||||
&mut self.harness.physics,
|
&mut self.harness.physics,
|
||||||
self.harness.state.time,
|
&self.harness.state,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user