Skip to content

Commit

Permalink
#1457 Update Systems.md
Browse files Browse the repository at this point in the history
changes for world name
  • Loading branch information
iHR4K authored Dec 11, 2024
1 parent b5b285d commit 6970756
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/Systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -791,12 +791,12 @@ An application can create custom phases, which can be (but don't need to be) bra

```c
// Phases must have the EcsPhase tag
ecs_entity_t Physics = ecs_new_w_id(ecs, EcsPhase);
ecs_entity_t Collisions = ecs_new_w_id(ecs, EcsPhase);
ecs_entity_t Physics = ecs_new_w_id(world, EcsPhase);
ecs_entity_t Collisions = ecs_new_w_id(world, EcsPhase);

// Phases can (but don't have to) depend on other phases which forces ordering
ecs_add_pair(ecs, Physics, EcsDependsOn, EcsOnUpdate);
ecs_add_pair(ecs, Collisions, EcsDependsOn, Physics);
ecs_add_pair(world, Physics, EcsDependsOn, EcsOnUpdate);
ecs_add_pair(world, Collisions, EcsDependsOn, Physics);

// Custom phases can be used just like regular phases
ECS_SYSTEM(world, Collide, Collisions, Position, Velocity);
Expand Down

0 comments on commit 6970756

Please sign in to comment.