unify mach.Call and mach.Runner into one type

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-09-23 11:25:33 -07:00 committed by Emi Gutekanst
parent 14ccd5a93c
commit 8054d03b4d
19 changed files with 125 additions and 97 deletions

View file

@ -58,11 +58,10 @@ fn init(
sprite: *gfx.Sprite.Mod,
sprite_pipeline: *gfx.SpritePipeline.Mod,
app: *App,
app_tick: mach.Call(App, .tick),
app_deinit: mach.Call(App, .deinit),
app_mod: mach.Functions(App),
) !void {
core.on_tick = app_tick.id;
core.on_exit = app_deinit.id;
core.on_tick = app_mod.id.tick;
core.on_exit = app_mod.id.deinit;
// We can create entities, and set components on them. Note that components live in a module
// namespace, e.g. the `.mach_gfx_sprite` module could have a 3D `.location` component with a different