summaryrefslogtreecommitdiff
path: root/engine-ecs/examples/with_sole.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-07-08 23:19:06 +0200
committerHampusM <hampus@hampusmat.com>2026-07-08 23:19:06 +0200
commit213e4cfc698f0e0f9fcfbe43cf8c49f8f331e699 (patch)
tree666b38f087985fa0ed6d85f3d046760b16666365 /engine-ecs/examples/with_sole.rs
parent05063e79465a33eb156c25edf8193fd77ba24314 (diff)
refactor(engine-ecs): rename entity creation fns to use 'spawn' terminology
Diffstat (limited to 'engine-ecs/examples/with_sole.rs')
-rw-r--r--engine-ecs/examples/with_sole.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine-ecs/examples/with_sole.rs b/engine-ecs/examples/with_sole.rs
index 4b2fa44..b76d9dc 100644
--- a/engine-ecs/examples/with_sole.rs
+++ b/engine-ecs/examples/with_sole.rs
@@ -46,14 +46,14 @@ fn main()
{
let mut world = World::new();
- world.create_declared_entity(&PRINT_AMMO_COUNT_PHASE);
+ world.spawn_declared_entity(&PRINT_AMMO_COUNT_PHASE);
world.register_system(*UPDATE_PHASE, count_ammo);
world.register_system(*PRINT_AMMO_COUNT_PHASE, print_total_ammo_count);
- world.create_entity((Ammo { ammo_left: 4 },));
- world.create_entity((Ammo { ammo_left: 7 },));
- world.create_entity((Ammo { ammo_left: 8 },));
+ world.spawn((Ammo { ammo_left: 4 },));
+ world.spawn((Ammo { ammo_left: 7 },));
+ world.spawn((Ammo { ammo_left: 8 },));
world.add_sole(AmmoCounter::default()).unwrap();