public World(Point size, string name) { this.sizeInTiles = size; TileMatrix = new int[size.X, size.Y, 2]; TileDataMatrix = new int[size.X, size.Y, 2]; LiquidMatrix = new int[size.X, size.Y]; //drawRectangles = new Rectangle[size.X, size.Y]; LightMatrix = new int[size.X, size.Y]; TempLightMatrix = new int[size.X, size.Y]; CrackMatrix = new byte[size.X, size.Y]; TileNeedsUpdateMatrix = new bool[size.X, size.Y, 2]; LiquidNeedsUpdateMatrix = new bool[size.X, size.Y]; wireMatrix = new byte[size.X, size.Y]; skyY = new int[size.X]; heightMap = new int[size.X]; lightingThreadFps = new FpsControl(); liquidThreadFps = new FpsControl(); for(int i=0;i<256;i++){ grayColors[i] = new Color((byte)i, (byte)i, (byte)i); } }
public World(Point size, string name) { this.sizeInTiles = size; TileMatrix = new int[size.X, size.Y, 2]; TileDataMatrix = new int[size.X, size.Y, 2]; LiquidMatrix = new int[size.X, size.Y]; //drawRectangles = new Rectangle[size.X, size.Y]; LightMatrix = new int[size.X, size.Y]; TempLightMatrix = new int[size.X, size.Y]; CrackMatrix = new byte[size.X, size.Y]; TileNeedsUpdateMatrix = new bool[size.X, size.Y, 2]; LiquidNeedsUpdateMatrix = new bool[size.X, size.Y]; wireMatrix = new byte[size.X, size.Y]; skyY = new int[size.X]; heightMap = new int[size.X]; lightingThreadFps = new FpsControl(); liquidThreadFps = new FpsControl(); for (int i = 0; i < 256; i++) { grayColors[i] = new Color((byte)i, (byte)i, (byte)i); } }