Testbed: add a constructor that calls a custom closure with bevy’s App

This commit is contained in:
Sébastien Crozet
2022-01-24 14:35:34 +01:00
committed by Sébastien Crozet
parent 0ef55c7df7
commit 22f21c14b8
3 changed files with 9 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ pub fn init_world(testbed: &mut Testbed) {
* Set up the testbed.
*/
let bytes = std::fs::read("state.bin").unwrap();
let mut state: State = bincode::deserialize(&bytes).unwrap();
let state: State = bincode::deserialize(&bytes).unwrap();
testbed.set_world(
state.bodies,