This is my code
protected class DTile {
bool isWalkable = false;
int tileGraphicId = 0;
string name = "Unknown";
}
List<DTile> tileTypes;
void InitTiles() {
tileTypes[1].name = "Floor";
tileTypes[1].isWalkable = true;
tileTypes[1].tileGraphicId = 1;
tileTypes[1].damagePerTurn = 0;
}
Errors on lines
tileTypes[1].name = "Floor";
tileTypes[1].isWalkable = true;
tileTypes[1].tileGraphicId = 1;
tileTypes[1].damagePerTurn = 0;
4 errors saying the same thing under different name
Assets/TileMap_D/DTileMap.cs(18,30):
error CS0122: `DTileMap.DTile.name’ is
inaccessible due to its protection
level
Was wondering if anyone can help me with this? Shouldn’t be accessible?