Exemple #1
0
    public void GetRooms()
    {
        List <Room> rooms = dungeonGrid.GetRooms();

        roomCenters = new List <Vector3>();

        foreach (Room r in rooms)
        {
            int     x      = r.xPos + Mathf.RoundToInt(r.xSize / 2);
            int     y      = r.yPos + Mathf.RoundToInt(r.ySize / 2);
            Vector3 center = new Vector3(x - 31.5f, 0, y - 31.5f);

            roomCenters.Add(center);
        }
    }