Backlog/projects/sampleGame/sampleGame.zig

32 lines
728 B
Zig

pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "SampleGame");
allocator: std.mem.Allocator = undefined,
pub fn create(allocator: std.mem.Allocator) !*@This() {
const self = try allocator.create(@This());
self.* = .{};
return self;
}
// called after the object has been reloaded
pub fn objectReload(self: *@This()) !void {
_ = self;
}
pub fn tick(self: *@This(), dt: f64) void {
_ = self;
_ = dt;
}
pub fn destroy(self: *@This()) void {
self.allocator.destroy(self);
}
pub fn start_module(args: core.ModuleLoaderArgs) !void {}
pub fn shutdown_module() void {}
const std = @import("std");
const backlog = @import("backlog");
const core = backlog.core;