the Question may be very basic, but I stumbeled across a line of Code I have never seen and was wondering what the use of the Square Brackets are.
public NodeItem (bool isWall, Vector2 pos, int x, int y)
{
this.isWall = isWall;
this.pos = pos;
this.x = x;
this.y = y;
}
1. private NodeItem[,] map;
2. map = new NodeItem[width, height];
Can someone explain to me how 1 and 2 work and what the advantage of this might be?