Skip to content

Commit

Permalink
"other_query" -> "query"
Browse files Browse the repository at this point in the history
  • Loading branch information
stargazing-dino committed Jul 5, 2024
1 parent 30c2289 commit c6bc022
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/farming_sim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ fn check_scene_loaded(
for (entity, instance) in query.iter() {
if scene_spawner.instance_is_ready(**instance) {
commands.entity(entity).insert(SceneProcessed);

let entities = scene_spawner
.iter_instance_entities(**instance)
.chain(std::iter::once(entity));
Expand All @@ -641,10 +642,10 @@ fn main() {
// This observer will attach components to entities in the scene based on their names.
.observe(
|trigger: Trigger<SceneLoaded>,
other_query: Query<(Entity, &Name)>,
query: Query<(Entity, &Name)>,
mut commands: Commands| {
for entity in trigger.event().entities.iter() {
if let Ok((entity, name)) = other_query.get(*entity) {
if let Ok((entity, name)) = query.get(*entity) {
let mut entity_commands = commands.entity(entity);

match name.as_str() {
Expand Down

0 comments on commit c6bc022

Please sign in to comment.