diff options
| author | HampusM <hampus@hampusmat.com> | 2026-07-08 23:19:06 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-07-08 23:19:06 +0200 |
| commit | 213e4cfc698f0e0f9fcfbe43cf8c49f8f331e699 (patch) | |
| tree | 666b38f087985fa0ed6d85f3d046760b16666365 /engine-ecs/examples/component_events.rs | |
| parent | 05063e79465a33eb156c25edf8193fd77ba24314 (diff) | |
refactor(engine-ecs): rename entity creation fns to use 'spawn' terminology
Diffstat (limited to 'engine-ecs/examples/component_events.rs')
| -rw-r--r-- | engine-ecs/examples/component_events.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engine-ecs/examples/component_events.rs b/engine-ecs/examples/component_events.rs index 7c65630..82d9b6c 100644 --- a/engine-ecs/examples/component_events.rs +++ b/engine-ecs/examples/component_events.rs @@ -56,9 +56,9 @@ fn main() world.register_observer(on_cheese_removed); world.register_observer(on_cheese_crumbs_changed); - world.create_entity((Cheese { name: "Brie" }, CheeseCrumbs { cnt: 0 })); - world.create_entity((Cheese { name: "Parmesan" }, CheeseCrumbs { cnt: 0 })); - world.create_entity((Cheese { name: "Gouda" }, CheeseCrumbs { cnt: 0 })); + world.spawn((Cheese { name: "Brie" }, CheeseCrumbs { cnt: 0 })); + world.spawn((Cheese { name: "Parmesan" }, CheeseCrumbs { cnt: 0 })); + world.spawn((Cheese { name: "Gouda" }, CheeseCrumbs { cnt: 0 })); world.step(); } |
