Struct PlatformerGraphProcessor
Processes the raw A* result for a request on the platformer graph. This processing ensures that the resulting segments all point in the correct direction.
Implements
Namespace: AnyPath.Graphs.PlatformerGraph
Assembly: AnyPath.dll
Syntax
public struct PlatformerGraphProcessor : IPathProcessor<PlatformerGraphLocation, PlatformerGraphLocation>
Remarks
The resulting path type is of the same type as the locations themselves, as this gives better performance and (almost) all of the data contained in the location might still be relevant when navigating.
Properties
InsertQueryStart
Should the original query's starting node be inserted as the first node? In some cases, this can be helpful for processing and prevent an insert operation requiring every element to be shifted.
Declaration
public bool InsertQueryStart { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
ProcessPath(PlatformerGraphLocation, PlatformerGraphLocation, NativeList<PlatformerGraphLocation>, NativeList<PlatformerGraphLocation>)
Process the raw path to another format.
Declaration
public void ProcessPath(PlatformerGraphLocation queryStart, PlatformerGraphLocation queryGoal, NativeList<PlatformerGraphLocation> pathNodes, NativeList<PlatformerGraphLocation> appendTo)
Parameters
| Type | Name | Description |
|---|---|---|
| PlatformerGraphLocation | queryStart | The original start node that was used for the query. This can be used to derive an exact location in the processed path. |
| PlatformerGraphLocation | queryGoal | The original goal node that was used for the query. This can be used to derive an exact location in the processed path. |
| NativeList<PlatformerGraphLocation> | pathNodes | All of the nodes that make up the path, including the goal as was yielded by the graph. Depending on InsertQueryStart, the query's starting node will be the first element. If the query's start was equal to the goal, this list will be empty, or if InsertQueryStart is true, will only contain the query's starting node. |
| NativeList<PlatformerGraphLocation> | appendTo |