This commit is contained in:
2021-12-24 00:40:50 -08:00
parent 7527694fd2
commit a77c6d76f0
4 changed files with 31 additions and 9 deletions

View File

@@ -99,10 +99,9 @@ ECS
entities & behaviours (got the entities!)
scripting!
Todo:
Load scene imgui interface w/ toml files
FPS graph port from voxel raycaster
This means a scene graph
better imgui interface with components & systems
Figure out eventing, GameInput, passing all events, etc.
+ texturing
@@ -158,7 +157,7 @@ fn main() {
let mut render_schedule = Schedule::builder()
.add_system(render::system::render_imgui_system())
//.add_system(render::system::render_test_system())
.add_system(render::system::render_function_system())
.add_system(render::system::render_performance_flag_system())
.build();

View File

@@ -38,10 +38,10 @@ pub fn run_physics(
Some(handle) => handle,
};
if collider.collider_handle == None {
let handle = physics_state.colliders.insert(
let handle = physics_state.colliders.insert_with_parent(
collider.collider.clone(),
//rigid_body_handle,
//&mut physics_state.bodies,
rigid_body_handle,
&mut physics_state.bodies,
);
collider.collider_handle = Some(handle);
}
@@ -106,6 +106,8 @@ pub fn update_models(
) {
// Make sure all the entities we care about are added to the system
// TODO add scenegraph component to compare against
// allows per node rotation, better logging
let mut query = <(&mut Collider, &mut Physics, &mut Mesh, &mut Position)>::query();
for (collider, physics, mesh, position) in query.iter_mut(world) {
let pos = physics_state

View File

@@ -114,7 +114,7 @@ impl RuntimeState {
self.mesh_cache.get(mesh)
}
pub fn get_entities(&mut self) -> Vec<TomlEntityDescription> {
pub fn p(&mut self) -> Vec<TomlEntityDescription> {
self.config_db.entities.clone()
}
@@ -132,7 +132,5 @@ impl RuntimeState {
self.mesh_cache.insert(filename, mesh);
}
}
//panic!("nah");
}
}