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/multiple_queries.rs | |
| parent | 05063e79465a33eb156c25edf8193fd77ba24314 (diff) | |
refactor(engine-ecs): rename entity creation fns to use 'spawn' terminology
Diffstat (limited to 'engine-ecs/examples/multiple_queries.rs')
| -rw-r--r-- | engine-ecs/examples/multiple_queries.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engine-ecs/examples/multiple_queries.rs b/engine-ecs/examples/multiple_queries.rs index 1a4aaad..d04e43f 100644 --- a/engine-ecs/examples/multiple_queries.rs +++ b/engine-ecs/examples/multiple_queries.rs @@ -63,23 +63,23 @@ fn main() world.register_system(*START_PHASE, do_attacks); - world.create_entity(( + world.spawn(( Health { health: 100 }, EnemyName { name: "Big spider".to_string() }, )); - world.create_entity(( + world.spawn(( Health { health: 30 }, EnemyName { name: "Small goblin".to_string() }, )); - world.create_entity(( + world.spawn(( Health { health: 30 }, EnemyName { name: "Headcrab".to_string() }, )); - world.create_entity((AttackStrength::Strong,)); - world.create_entity((AttackStrength::Weak,)); + world.spawn((AttackStrength::Strong,)); + world.spawn((AttackStrength::Weak,)); world.step(); } |
