C# Class GameEngine.Pathfinding.AStar

Mostra file Open project: MichaelAquilina/Some-2D-RPG

Public Methods

Method Description
GeneratePath ( Vector2 pxStart, Vector2 pxEnd, TeeEngine engine, GameTime gameTime, NodeValidationHandler validator ) : Path

Uses the AStar algorithm to generate a Path from pxStart to pxEnd of valid ANodes to pass through. What is considered to be a valid ANode is determined by the current delegate method assigned to the instance's Validator property. The method will return an empty path if the location is impossible to reach from the specified start location.

Method Details

GeneratePath() public method

Uses the AStar algorithm to generate a Path from pxStart to pxEnd of valid ANodes to pass through. What is considered to be a valid ANode is determined by the current delegate method assigned to the instance's Validator property. The method will return an empty path if the location is impossible to reach from the specified start location.
public GeneratePath ( Vector2 pxStart, Vector2 pxEnd, TeeEngine engine, GameTime gameTime, NodeValidationHandler validator ) : Path
pxStart Vector2
pxEnd Vector2
engine TeeEngine
gameTime Microsoft.Xna.Framework.GameTime
validator NodeValidationHandler
return Path