Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Splits the string into a 2D array
- str.Split(' ');
- int X = int.Parse(str.Split(' ')[0]);
- int Y = int.Parse(str.Split(' ')[1]);
- map_objects = new Entity[X, Y];
- for (int i = 0; i < Y; i++)
- {
- str = sr.ReadLine();
- for (int j = 0; j < X; j++)
- {
- if (str[j] == 'X')
- {
- map_objects[j, i] = new Wall(texture, new Vector2(pos.X + size * j, pos.Y + size * i));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement