Blaze Brigade  Rev0
Public Member Functions | Properties | List of all members
Model.Graph Class Reference

Structure that represents the game map. More...

Public Member Functions

 Graph (int x, int y)
 
Node getNode (int x, int y)
 
Node getNode (Vector2 pixelCoordinates)
 
Node getNode (Tuple< int, int > position)
 
void setNode (Node node, int x, int y)
 

Properties

int NumberOfNodes [get]
 
int Width [get]
 
int Height [get]
 

Detailed Description

Structure that represents the game map.

Programmatical representation of the map grid. Composed of Nodes that represent each tile on the grid.

Constructor & Destructor Documentation

§ Graph()

Model.Graph.Graph ( int  x,
int  y 
)

Creates a graph.

Parameters
xWidth of the graph.
yHeight of the graph.

Member Function Documentation

§ getNode() [1/3]

Node Model.Graph.getNode ( int  x,
int  y 
)

Returns the node on the graph at the specified position (by nodes).

Parameters
xX position of the node (by nodes).
yY position of the node (by nodes).

§ getNode() [2/3]

Node Model.Graph.getNode ( Vector2  pixelCoordinates)

Returns the node on the graph at the specified position (by pixel coordinates).

Parameters
pixelCoordinatesPixel coordinates of the node, which contains the X coordinate and Y coordinate.

§ getNode() [3/3]

Node Model.Graph.getNode ( Tuple< int, int >  position)

Returns the node on the graph at the specified position (by nodes).

Parameters
positionPosition of the node, which contains the X position and Y position (by nodes).

§ setNode()

void Model.Graph.setNode ( Node  node,
int  x,
int  y 
)

Sets the node at the specified position on the graph to the specified node.

Parameters
nodeNode to set.
xX position of the node (by nodes).
yY position of the node (by nodes).

Property Documentation

§ Height

int Model.Graph.Height
get

Returns the height of the graph (by number of nodes).

§ NumberOfNodes

int Model.Graph.NumberOfNodes
get

Returns the total number of nodes in the graph.

§ Width

int Model.Graph.Width
get

Returns the width of the graph (by number of nodes).


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