コード例 #1
0
    int[,] createRoom(rect room, int[,] map)
    {
        for (int x = room.getX1(); x < room.getX2(); x++)
        {
            for (int y = room.getY1(); y < room.getY2(); y++)
            {
                map[x, y] = (int)tileType.floor;
            }
        }

        return(map);
    }
コード例 #2
0
 public bool intersect(rect other)
 {
     return(x1 <= other.getX2() && x2 >= other.getX1() && y1 <= other.getY2() && y2 >= other.getY1());
 }