C# Class GameEngine.Pathfinding.ANode

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

Public Methods

Method Description
ANode ( Vector2 txPos, ANode parent = null ) : System
IsDiagonalNeighbor ( ANode node ) : bool

Returns a boolean value specifying if the current node is a diagonal neighbour to the node specified in the parameter.

SetParent ( ANode parent ) : void

Sets the specified node as the current nodes Parent. The method will automatically recalculate the total Length of the current node as well as update the childe reference for the parent being set.

ToString ( ) : string

Method Details

ANode() public method

public ANode ( Vector2 txPos, ANode parent = null ) : System
txPos Vector2
parent ANode
return System

IsDiagonalNeighbor() public method

Returns a boolean value specifying if the current node is a diagonal neighbour to the node specified in the parameter.
public IsDiagonalNeighbor ( ANode node ) : bool
node ANode
return bool

SetParent() public method

Sets the specified node as the current nodes Parent. The method will automatically recalculate the total Length of the current node as well as update the childe reference for the parent being set.
public SetParent ( ANode parent ) : void
parent ANode
return void

ToString() public method

public ToString ( ) : string
return string