Fix examples

This commit is contained in:
Sébastien Crozet
2022-07-01 12:04:38 +02:00
parent b9f76e2fda
commit d3ca956565
4 changed files with 4 additions and 4 deletions

View File

@@ -112,7 +112,7 @@ pub fn init_world(testbed: &mut Testbed) {
// Callback that will be executed on the main loop to handle proximities.
testbed.add_callback(move |mut graphics, physics, events, _| {
while let Ok(prox) = events.events.try_recv() {
while let Ok(prox) = events.collision_events.try_recv() {
let color = if prox.started() {
[1.0, 1.0, 0.0]
} else {

View File

@@ -72,7 +72,7 @@ pub fn init_world(testbed: &mut Testbed) {
// Callback that will be executed on the main loop to handle proximities.
testbed.add_callback(move |mut graphics, physics, events, _| {
while let Ok(prox) = events.events.try_recv() {
while let Ok(prox) = events.collision_events.try_recv() {
let color = if prox.started() {
[1.0, 1.0, 0.0]
} else {