module: write components using a struct pattern
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
17db5498ee
commit
2115f5832a
8 changed files with 45 additions and 62 deletions
|
|
@ -47,7 +47,7 @@ test "example" {
|
|||
|
||||
pub const name = .physics;
|
||||
pub const components = .{
|
||||
.{ .name = .id, .type = u32 },
|
||||
.id = .{ .type = u32 },
|
||||
};
|
||||
pub const global_events = .{
|
||||
.tick = .{ .handler = tick },
|
||||
|
|
@ -61,7 +61,7 @@ test "example" {
|
|||
const Renderer = struct {
|
||||
pub const name = .renderer;
|
||||
pub const components = .{
|
||||
.{ .name = .id, .type = u16 },
|
||||
.id = .{ .type = u16 },
|
||||
};
|
||||
pub const global_events = .{
|
||||
.tick = .{ .handler = tick },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue