Added custom functions to loop
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
use hypoloop::Simulation;
|
||||
|
||||
// look into using closures for this
|
||||
fn main() {
|
||||
// create sim
|
||||
// create sim and configure it
|
||||
let mut sim = Simulation::new();
|
||||
sim.set_update_function(test);
|
||||
//sim.set_realtime(false);
|
||||
|
||||
// run sim
|
||||
sim.run();
|
||||
}
|
||||
|
||||
fn test() {
|
||||
println!("Test");
|
||||
}
|
||||
Reference in New Issue
Block a user