34 lines
861 B
Zig
34 lines
861 B
Zig
pub const Slack = core.SlackStruct(@This(), 1024);
|
|
|
|
allocator: std.mem.Allocator = undefined,
|
|
entity: core.Entity = undefined,
|
|
camera: *extras.FpCamera = undefined,
|
|
|
|
pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "extern.FpPlayer");
|
|
|
|
pub fn create(allocator: std.mem.Allocator) !*@This() {
|
|
const self = try Slack.create(allocator);
|
|
|
|
self.* = .{
|
|
.allocator = allocator,
|
|
.entity = try core.createEntity(),
|
|
.camera = try extras.FpCamera.create(allocator),
|
|
};
|
|
|
|
return self;
|
|
}
|
|
|
|
pub fn objectReload(self: *@This()) void {
|
|
_ = self;
|
|
}
|
|
|
|
pub fn destroy(self: *@This()) void {
|
|
self.camera.destroy();
|
|
self.allocator.destroy(Slack.fromPtr(self));
|
|
}
|
|
|
|
const backlog = @import("backlog");
|
|
const core = backlog.core;
|
|
const std = @import("std");
|
|
const extras = @import("gameExtras");
|