Here is the code I use to define my array, this code is above my Initialize():
public Tile[,] tileArray;
Here is my code in my protected overide void Initialize() that declares it:
Tile[,] tileArray = new Tile[gridScope, gridScope];
Tile is a class used to represent a tile for my game.
I do get a inconsistent accessibility error when i try to run this; I cannot, however, put public in front of the declaration because then visual studio tells me that public is an invalid expression at that Tile is expecting a ;.
I need to refer to this array in other classes so I can manipulate the tiles but I do not know how to make it consistently public.
How do I make tileArray public?
in
initialize()you don’t needTile[,](this will create a local version of tileArray which will be used instead of your global one).i.e.
I won’t even ask why you want it public…