module: event handlers are defined ahead of time
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
0fc3bf6545
commit
3bfafe102d
12 changed files with 1099 additions and 967 deletions
|
|
@ -41,11 +41,16 @@ const d0 = 0.000001;
|
|||
pub const name = .game;
|
||||
pub const Mod = mach.Mod(@This());
|
||||
|
||||
pub const events = .{
|
||||
.{ .global = .init, .handler = init },
|
||||
.{ .global = .tick, .handler = tick },
|
||||
};
|
||||
|
||||
pub const Pipeline = enum(u32) {
|
||||
default,
|
||||
};
|
||||
|
||||
pub fn init(
|
||||
fn init(
|
||||
engine: *mach.Engine.Mod,
|
||||
sprite_mod: *Sprite.Mod,
|
||||
game: *Mod,
|
||||
|
|
@ -82,7 +87,7 @@ pub fn init(
|
|||
};
|
||||
}
|
||||
|
||||
pub fn tick(
|
||||
fn tick(
|
||||
engine: *mach.Engine.Mod,
|
||||
sprite_mod: *Sprite.Mod,
|
||||
game: *Mod,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue