Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
andreakarasho committed Mar 8, 2024
1 parent c004336 commit 8889959
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ var silverCoins = ecs.Entity()
woodenChest.AddChild<ChestContainer>(sword);
woodenChest.AddChild<ChestContainer>(goldCoins);
woodenChest.AddChild<ChestContainer>(silverCoins);

// Query for all children that have a 'ChestContainer' relationship
ecs.Filter<With<Child<ChestContainer>>>()
.Query((EntityView entity) => {
Console.WriteLine($"I'm {entity.ID} and I'm a child of the wooden chest!");
});
```

Unique entities
Expand Down

0 comments on commit 8889959

Please sign in to comment.