-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make World only ever require &self. (#270)
This is wide but relatively shallow update that makes `World` only ever require `&self`, allowing us to remove the system initialization stage that was necessary to have `&mut World` access for initializing resources and components. The main change was to allow `Resources` to have resources added to it with only a `&self` reference by using a `once_map` internally. This meant that all resource cells now become `Option<SchemaBox>` on the inside. This conceptually means that cells for reasources are lazily initialized and always considered to be present, but they may or may not actually contain a resource value.
- Loading branch information
Showing
20 changed files
with
467 additions
and
532 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.