all: rename mach.Entity.Mod -> mach.Entities.Mod

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-05-07 16:41:39 -07:00 committed by Stephen Gutekanst
parent 11ebce62a3
commit 541ce9e7c0
18 changed files with 69 additions and 69 deletions

View file

@ -13,11 +13,11 @@ pub const AnyEvent = @import("module.zig").AnyEvent;
pub const Merge = @import("module.zig").Merge;
pub const merge = @import("module.zig").merge;
pub const builtin_modules = .{Entity};
pub const builtin_modules = .{Entities};
/// Builtin .entity module
pub const Entity = struct {
pub const name = .entity;
/// Builtin .entities module
pub const Entities = struct {
pub const name = .entities;
pub const Mod = mach.Mod(@This());
@ -82,15 +82,15 @@ test "entities DB" {
defer world.deinit(allocator);
// Initialize module state.
var entity = &world.mod.entity;
var entities = &world.mod.entities;
var physics = &world.mod.physics;
var renderer = &world.mod.renderer;
physics.init(.{ .pointer = 123 });
_ = physics.state().pointer; // == 123
const player1 = try entity.new();
const player2 = try entity.new();
const player3 = try entity.new();
const player1 = try try entities.new();
const player2 = try try entities.new();
const player3 = try try entities.new();
try physics.set(player1, .id, 1001);
try renderer.set(player1, .id, 1001);