aa
This commit is contained in:
parent
9cd72d5809
commit
9646804dcd
@ -29,8 +29,12 @@ impl WindowContext<'_>{
|
||||
winit::event::WindowEvent::DroppedFile(path)=>{
|
||||
match crate::file::load(path.as_path()){
|
||||
Ok(map)=>{
|
||||
self.physics_thread.send(TimedInstruction{time,instruction:crate::physics_worker::Instruction::ClearModels}).unwrap();
|
||||
self.physics_thread.send(TimedInstruction{time,instruction:crate::physics_worker::Instruction::GenerateModels(map)}).unwrap();
|
||||
self.physics_thread.send(TimedInstruction{time,instruction:crate::physics_worker::Instruction::Passthrough(
|
||||
crate::physics_worker::PassthroughInstruction::ClearModels
|
||||
)}).unwrap();
|
||||
self.physics_thread.send(TimedInstruction{time,instruction:crate::physics_worker::Instruction::Passthrough(
|
||||
crate::physics_worker::PassthroughInstruction::GenerateModels(map)
|
||||
)}).unwrap();
|
||||
},
|
||||
Err(e)=>println!("Failed to load map: {e}"),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user