C# Class NodeManager, Corsair

Show file Open project: Final-Parsec/Corsair Class Usage Examples

Public Properties

Property Type Description
nodes ].Node[
size_x int
size_y int

Public Methods

Method Description
BlockNode ( Vector3 position ) : bool
CorrectInitialPosition ( Vector3 vector ) : Vector3

Corrects the Y position of the Vector3 to layer correctly with the rest of the map. Uses the original Y value of the vector.

CorrectPosition ( Vector3 vector ) : Vector3

Corrects the Y position of the Vector3 to layer correctly with the rest of the map. Does not use the original Y value of the vecotor.

GetClosestNode ( Vector3 location ) : Node

Gets the tile from location.

GetDestinationNode ( ) : Node
GetNodeFromLocation ( Vector3 location ) : Node

Gets the tile from location.

GetSpawnNodes ( ) : Node[]
NodeManager ( ) : System
UnBlockNode ( Vector3 position ) : void

Private Methods

Method Description
BuildNodes ( ) : void
ConnectNodes ( ) : void
MakeNodes ( ) : void
SetGridPosition ( ) : void
SetGridSize ( ) : void

Method Details

BlockNode() public method

public BlockNode ( Vector3 position ) : bool
position Vector3
return bool

CorrectInitialPosition() public method

Corrects the Y position of the Vector3 to layer correctly with the rest of the map. Uses the original Y value of the vector.
public CorrectInitialPosition ( Vector3 vector ) : Vector3
vector Vector3 The original position of the object
return Vector3

CorrectPosition() public method

Corrects the Y position of the Vector3 to layer correctly with the rest of the map. Does not use the original Y value of the vecotor.
public CorrectPosition ( Vector3 vector ) : Vector3
vector Vector3 The original position of the object
return Vector3

GetClosestNode() public method

Gets the tile from location.
public GetClosestNode ( Vector3 location ) : Node
location Vector3
return Node

GetDestinationNode() public method

public GetDestinationNode ( ) : Node
return Node

GetNodeFromLocation() public method

Gets the tile from location.
public GetNodeFromLocation ( Vector3 location ) : Node
location Vector3
return Node

GetSpawnNodes() public method

public GetSpawnNodes ( ) : Node[]
return Node[]

NodeManager() public method

public NodeManager ( ) : System
return System

UnBlockNode() public method

public UnBlockNode ( Vector3 position ) : void
position Vector3
return void

Property Details

nodes public property

public Node[,] nodes
return ].Node[

size_x public property

public int size_x
return int

size_y public property

public int size_y
return int