31 lines
510 B
Zig
31 lines
510 B
Zig
const GenerationalArrayList = @import("./generational_array_list.zig").GenerationalArrayList;
|
|
|
|
const Gfx = @import("./graphics.zig");
|
|
|
|
const Math = @import("./math.zig");
|
|
const Vec2 = Math.Vec2;
|
|
|
|
const Entity = @This();
|
|
|
|
pub const List = GenerationalArrayList(Entity);
|
|
pub const Id = List.Id;
|
|
|
|
pub const Type = enum {
|
|
nil,
|
|
player,
|
|
solid,
|
|
pot,
|
|
door,
|
|
key,
|
|
};
|
|
|
|
type: Type,
|
|
position: Vec2,
|
|
|
|
locked: bool = false,
|
|
|
|
render_tile: ?union(enum) {
|
|
position: Vec2,
|
|
id: Gfx.TileId
|
|
} = null
|