Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
andreakarasho committed Mar 7, 2024
1 parent 2b63265 commit 28bd833
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ foreach (var archetype in world.Filter<(With<Position>, With<Velocity>, Not<Npc>
# Plugins

Relationships

```csharp
// Spawn the container
var woodenChest = ecs.Entity()
Expand All @@ -115,12 +116,25 @@ woodenChest.AddChild(silverCoins);
```

Unique entities

```csharp
// create or get an entity named 'Khun'
var dog = ecs.Entity("Khun");
dog.Set<Bau>(); 🐶
```

Enable/Disable entities

```csharp
var ent = ecs.Entity();
ent.Disable();
ent.Enable();
bool isEnabled = ent.IsEnabled();

// `Disabled` is a simple built-in component!
ecs.Filter<Not<Disabled>>()
.Query((EntityView entity) => { });
```

# Credits

Expand Down

0 comments on commit 28bd833

Please sign in to comment.