Here is the code:
thisRow.Column.add( tempCell ); // Creating the map Columns???
Row.add( thisRow ); // Adding the Columns to the row???
These two line is what does not work but works in VS2010
The actual error is the last line of this post
Thanks for all the help in advance
#region Map Cell Class
class MapCell
{
/******************************************
// This Class is to contain the specific tile
// information such as the TIleID
*******************************************/
public
/******************************************
// Constructor:
*******************************************/
#region Constructor
MapCell( )
{
TileID = 0;
Seen = false;
}
#endregion
#region Properties
int TileID
{
set{ tileID = value;}
get{ return tileID; }
}
bool Seen
{
set{ seen = value;}
get{ return seen; }
}
#endregion
protected
/******************************************
// Protected Data members:
*******************************************/
#region Data Members
int tileID; // What type of tile is this?
bool seen; // Has this tile been seen?
#endregion
};
#endregion
#region Map Column Class
class MapColumn
{ // Start MapColumn Class.
/******************************************
// This class is to represent a column of cells.
*******************************************/
public
/******************************************
// Public Data Members:
*******************************************/
/* This contains a list of Columns that contain a Map Cell */
List < MapCell > Column;
}; // End MapColumn Class.
#endregion
public class Map : MonoBehaviour
{
List< MapColumn > Row;
Row = new List();
for ( int y = 0; y < mapHeight; y++ ) // Creating the number of rows indicated by the map height.
{
// Initializing the temp Map Row:
MapColumn thisRow = new MapColumn();
MapCell tempCell = new MapCell();
for ( int x = 0; x < mapWidth; x++ ) // Creating the number of Columns indicated by the map width.
{
thisRow.Column.add( tempCell ); // Creating the map Columns???????????
}
// This line is what does not work
Row.add( thisRow ); // Adding the Columns to the row???????????????
}
}
The error is on Both adds above
List does not contain a definition for Add and no extension method Add excepting a first argument type List