Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static PictureBox[,] tile = new PictureBox[100,100];
- public Map(int map_x, int map_y)
- {
- this.map_map = new int[map_x, map_y];
- for (int i = 0; i < map_map.GetLength(0); i++)
- {
- for (int j = 0; j < map_map.GetLength(1); j++)
- {
- tile[i, j] = new PictureBox();
- tile[i, j].BackColor = System.Drawing.Color.Red;
- tile[i, j].Image = Image.FromFile("../../Screenshot (189).png");
- tile[i, j].Location = new Point((i * 40) , (j * 40));
- tile[i, j].Size = new Size(40, 40);
- tile[i, j].SizeMode = PictureBoxSizeMode.StretchImage;
- tile[i, j].Show();
- tile[i, j].Update();
- Console.WriteLine(i + " " + j);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement