Commit Graph

1 Commits

Author SHA1 Message Date
hypercross 8557fc864d feat: add singleton support to World
Introduces a mechanism to store and access singleton components on a
reserved entity. The singleton entity is automatically excluded from
all standard queries to prevent it from being processed like regular
entities.

- Added `SetSingleton`, `GetSingleton`, `HasSingleton`, and
  `RemoveSingleton` to `World`.
- Added `RegisterSingleton` to `EntityAllocator` to support the
  reserved entity.
- Updated `QueryExecutor` to skip the singleton entity during
  iteration.
- Added unit tests for singleton functionality.
2026-07-18 19:53:58 +08:00