ecs: rename module globals -> state
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
e6cfbbe82a
commit
fcf9943d0f
2 changed files with 30 additions and 29 deletions
|
|
@ -2,8 +2,9 @@
|
|||
//!
|
||||
//! ## Design principles:
|
||||
//!
|
||||
//! * Clean-room implementation (author has not read any other ECS implementation code, just working
|
||||
//! from first-principles)
|
||||
//! * Initially a 100% clean-room implementation, working from first-principles. Later informed by
|
||||
//! research into how other ECS work, with advice from e.g. Bevy and Flecs authors at different
|
||||
//! points (thank you!)
|
||||
//! * Solve the problems ECS solves, in a way that is natural to Zig and leverages Zig comptime.
|
||||
//! * Fast. Optimal for CPU caches, multi-threaded, leverage comptime as much as is reasonable.
|
||||
//! * Simple. Small API footprint, should be natural and fun - not like you're writing boilerplate.
|
||||
|
|
@ -71,7 +72,7 @@ test "example" {
|
|||
var world = try World(modules).init(allocator);
|
||||
defer world.deinit();
|
||||
|
||||
// Initialize globals.
|
||||
// Initialize module state.
|
||||
world.set(.physics, .pointer, 123);
|
||||
_ = world.get(.physics, .pointer); // == 123
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue