Beispiel #1
0
        public static void NewFloor(Room[,] map)
        {
            for (int x = 0; x < map.GetLength(0); x++)
            {
                for (int y = 0; y < map.GetLength(1); y++)
                {
                    if (map[x,y].roomVersion == 1)
                    {
                        currentRoomNumber[0] = x;
                        currentRoomNumber[1] = y;
                        x = map.GetLength(0);
                        y = map.GetLength(1);

                        CurrentRoom = map[currentRoomNumber[0], currentRoomNumber[1]];
                    }
                }
            }
        }
Beispiel #2
0
 public static void MoveBetweenRooms(Room[,] map, Direction direction)
 {
     if (direction == Direction.Up)
     {
         currentRoomNumber[1] -= 1;
     }
     if (direction == Direction.Left)
     {
         currentRoomNumber[0] -= 1;
     }
     if (direction == Direction.Down)
     {
         currentRoomNumber[1] += 1;
     }
     if (direction == Direction.Right)
     {
         currentRoomNumber[0] += 1;
     }
 }