module: components are written in the same style as events
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
f50a27b83d
commit
7e0b9dde68
10 changed files with 265 additions and 123 deletions
|
|
@ -47,8 +47,8 @@ test "example" {
|
|||
pointer: u8,
|
||||
|
||||
pub const name = .physics;
|
||||
pub const components = struct {
|
||||
pub const id = u32;
|
||||
pub const components = .{
|
||||
.{ .name = .id, .type = u32 },
|
||||
};
|
||||
pub const events = .{
|
||||
.{ .global = .tick, .handler = tick },
|
||||
|
|
@ -61,8 +61,8 @@ test "example" {
|
|||
|
||||
const Renderer = struct {
|
||||
pub const name = .renderer;
|
||||
pub const components = struct {
|
||||
pub const id = u16;
|
||||
pub const components = .{
|
||||
.{ .name = .ud, .type = u16 },
|
||||
};
|
||||
pub const events = .{
|
||||
.{ .global = .tick, .handler = tick },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue