Skip to content

Commit

Permalink
Update variable names in the cubes example (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jbat1Jumper authored Sep 4, 2024
1 parent 8a46743 commit f16979d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/cubes/cubes/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ fn update_cubes_from_mods(
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<StandardMaterial>>,
mut events_out: EventReader<ModMessage>, // GET messages FROM mods
mut events_in: EventWriter<HostMessage>, // SEND messages TO mods
mut mod_messages: EventReader<ModMessage>,
mut host_messages: EventWriter<HostMessage>,
mut query: Query<&mut Transform>,
) {
for event in events_out.iter() {
for event in mod_messages.iter() {
match event {
ModMessage::MoveCube { entity_id, x, y, z } => {
if let Ok(mut transform) = query.get_mut(Entity::from_raw(*entity_id)) {
Expand All @@ -79,7 +79,7 @@ fn update_cubes_from_mods(
})
.id()
.index();
events_in.send(HostMessage::SpawnedCube {
host_messages.send(HostMessage::SpawnedCube {
mod_state: *mod_state,
entity_id,
});
Expand Down

0 comments on commit f16979d

Please sign in to comment.