Complete 3.3 Sounds and events

This commit is contained in:
Timothy Warren 2020-07-27 10:13:52 -04:00
parent 1628a5d271
commit b9245a2dff
2 changed files with 7 additions and 1 deletions

View File

@ -45,6 +45,12 @@ impl event::EventHandler for Game {
time.delta += timer::delta(context); time.delta += timer::delta(context);
} }
// Run event system
{
let mut es = EventSystem {};
es.run_now(&self.world);
}
Ok(()) Ok(())
} }

View File

@ -60,7 +60,7 @@ impl<'a> System<'a> for EventSystem {
let sound = if is_correct_spot { let sound = if is_correct_spot {
"correct" "correct"
} else { } else {
"inncorrect" "incorrect"
}; };
audio_store.play_sound(&sound.to_string()) audio_store.play_sound(&sound.to_string())