module: write components using a struct pattern

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-04-05 05:35:58 -07:00 committed by Stephen Gutekanst
parent 17db5498ee
commit 2115f5832a
8 changed files with 45 additions and 62 deletions

View file

@ -74,14 +74,14 @@ test "query" {
struct {
pub const name = .game;
pub const components = .{
.{ .name = .name, .type = []const u8 },
.name = .{ .type = []const u8 },
};
},
struct {
pub const name = .physics;
pub const components = .{
.{ .name = .location, .type = Location },
.{ .name = .rotation, .type = Rotation },
.location = .{ .type = Location },
.rotation = .{ .type = Rotation },
};
},
struct {