Class PathDef
A path consisting of lanes with matching node counts.
public sealed class PathDef
- Inheritance
-
PathDef
- Inherited Members
Constructors
PathDef(params Vec2[][])
Copies and validates lane geometry; duplicate adjacent nodes are permitted.
public PathDef(params Vec2[][] lanes)
Parameters
lanesVec2[][]
PathDef(Vec2[][], int, int)
Creates a path with explicit entry and exit markers.
public PathDef(Vec2[][] lanes, int entryNode, int exitNode)
Parameters
Properties
EntryNode
Node at which enemies enter the lane.
public int EntryNode { get; }
Property Value
ExitNode
Node at which enemies leave the level.
public int ExitNode { get; }
Property Value
FollowingPathIndex
Next path index, or minus one for a final exit.
public int FollowingPathIndex { get; }
Property Value
LaneCount
Number of parallel lanes.
public int LaneCount { get; }
Property Value
NodeCount
Number of nodes per lane.
public int NodeCount { get; }
Property Value
Methods
GetNode(int, int)
Reads a node without exposing mutable arrays.
public Vec2 GetNode(int lane, int node)
Parameters
Returns
GetRemainingDistance(int, int)
Reads distance from a node to the exit along its lane.
public float GetRemainingDistance(int lane, int node)
Parameters
Returns
WithFollowingPath(int)
Copies immutable geometry with a forward path connection; the level validates references and cycles.
public PathDef WithFollowingPath(int followingPathIndex)
Parameters
followingPathIndexint