Road splitting setup (intersection data)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
const Vector2 = @import("raylib").Vector2;
|
||||
|
||||
const Road = @import("../infrastructure/road.zig").Road;
|
||||
const Node = @import("../infrastructure/node.zig").Node;
|
||||
|
||||
@@ -6,3 +8,12 @@ pub const Entity = union(enum) {
|
||||
node: *Node,
|
||||
road: *Road,
|
||||
};
|
||||
|
||||
/// Represents intersection data, mainly used in cases where we draw over existing roads
|
||||
/// and wish to see data about such intersections or collisions
|
||||
pub const IntersectionData = struct {
|
||||
/// Tracks the location of the intersection
|
||||
pos: Vector2,
|
||||
/// Points to the road where the intersection occured
|
||||
road: *Road,
|
||||
};
|
||||
Reference in New Issue
Block a user