Skip to content

Commit

Permalink
Access deactivated entities.
Browse files Browse the repository at this point in the history
  • Loading branch information
isadorasophia committed Aug 29, 2024
1 parent 57f7113 commit 14e82f0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Bang/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,12 @@ public ImmutableArray<Entity> GetAllEntities()
return allEntities.ToImmutableArray();
}

/// <summary>
/// This should be used very cautiously! I hope you know what you are doing.
/// It fetches all the deactivated entities within the world and return them.
/// </summary>
public ImmutableArray<Entity> GetAllDeactivatedEntities() => [.. _deactivatedEntities.Values];

/// <summary>
/// Total of entities in the world. This is useful for displaying debug information.
/// </summary>
Expand Down

0 comments on commit 14e82f0

Please sign in to comment.