DC/RTS Documentation  v1.62
A Unity3D System Incorporating the Functionality of a Dungeon Crawler or Real Time Strategy System
 All Classes Files Functions Variables Enumerations Enumerator Properties Pages
PathFinder Class Reference

This is an Implementation of the A* Pathfinding System, that takes in GridSquares from the GridGenerator Class. More...

Public Member Functions

 PathFinder (GridGenerator grid)
 Creates a new PathFinder object for a particular GridGenerator. More...
 
void CalculateNewPath (GridGenerator.GridSquare init, GridGenerator.GridSquare final)
 Initiates the generation of a NewPath given an Initial GridSquare and Final GridSquare. More...
 
void CalculateNewPath (Transform moveobj, GridGenerator.GridSquare init, GridGenerator.GridSquare final)
 Begins Calculation of a New Path with a Unity3D Transform Movement Object, from it's Initial GridGenerator.GridSquare to a Final GridGenerator.GridSquare. More...
 
List< GridGenerator.GridSquareCalculateParticularPath (GridGenerator.GridSquare init, GridGenerator.GridSquare final)
 Calculates a particular path from an initial GridGenerator.GridSquare to a final GridGenerator.GridSquare. More...
 
void CheckPathCalculation ()
 Resets the GridGenerator if the Path has been Generated and Calculated, and Starts Calculation of the Next PathCalculator in the PathFinder Queue if there is One. More...
 
void DrawPath ()
 Wrapper Around PathCalculator.DrawPath for use Elsewhere. More...
 
List< GridGenerator.GridSquaregetCalculatedTiles ()
 Retrieves the Calculated Path Tiles for Use Elsewhere. More...
 

Detailed Description

This is an Implementation of the A* Pathfinding System, that takes in GridSquares from the GridGenerator Class.

The Path is Generated within a Separate Thread for Increased Performance.

Constructor & Destructor Documentation

PathFinder.PathFinder ( GridGenerator  grid)

Creates a new PathFinder object for a particular GridGenerator.

Parameters
gridThe GridGenerator pertaining to this PathFinder

Member Function Documentation

void PathFinder.CalculateNewPath ( GridGenerator.GridSquare  init,
GridGenerator.GridSquare  final 
)

Initiates the generation of a NewPath given an Initial GridSquare and Final GridSquare.

Parameters
initInitial GridSquare
finalFinal GridSquare
void PathFinder.CalculateNewPath ( Transform  moveobj,
GridGenerator.GridSquare  init,
GridGenerator.GridSquare  final 
)

Begins Calculation of a New Path with a Unity3D Transform Movement Object, from it's Initial GridGenerator.GridSquare to a Final GridGenerator.GridSquare.

Parameters
moveobjThe Unity3D Transform Object to be Used and Updated. This Requires the Function ReceiveCalculatedPath as seen in ControlObjHander.ReceiveCalculatedPath.
initThe Initial GridGenerator.GridSquare.
finalThe Final GridGenerator.GridSquare.
List<GridGenerator.GridSquare> PathFinder.CalculateParticularPath ( GridGenerator.GridSquare  init,
GridGenerator.GridSquare  final 
)

Calculates a particular path from an initial GridGenerator.GridSquare to a final GridGenerator.GridSquare.

Parameters
initInitial GridGenerator.GridSquare
finalFinal GridGenerator.GridSquare
Returns
The List of GridGenerator.Gridsquare containing the calculated path from starting GridSquare to ending GridSquare.
void PathFinder.CheckPathCalculation ( )

Resets the GridGenerator if the Path has been Generated and Calculated, and Starts Calculation of the Next PathCalculator in the PathFinder Queue if there is One.

void PathFinder.DrawPath ( )

Wrapper Around PathCalculator.DrawPath for use Elsewhere.

List<GridGenerator.GridSquare> PathFinder.getCalculatedTiles ( )

Retrieves the Calculated Path Tiles for Use Elsewhere.

Returns
The Calculated Path Tiles

The documentation for this class was generated from the following file: