text almost works
This commit is contained in:
@@ -60,14 +60,15 @@ pub fn save_level(path: &str, game: &mut TestGame, renderer: &mut VulkanRenderer
|
||||
}
|
||||
}).collect();
|
||||
|
||||
let objects = game.game_objects.iter().map(|game_object_handle| {
|
||||
let objects = game.game_objects.iter().filter_map(|game_object_handle| {
|
||||
let game_object = game_object_handle.get_game_object(renderer).unwrap();
|
||||
ObjectJson {
|
||||
if game_object.pipeline_index != 0 { return None; }
|
||||
Some(ObjectJson {
|
||||
mesh_index: Some(game_object_handle.object_index),
|
||||
position: game_object.position.into(),
|
||||
rotation: game_object.rotation.into(),
|
||||
scale: game_object.scale.into()
|
||||
}
|
||||
})
|
||||
}).collect();
|
||||
|
||||
let player = ObjectJson {
|
||||
|
||||
Reference in New Issue
Block a user