Exemplo n.º 1
0
        public LevelLayout(IntPair levelSize)
        {
            MainPath        = new List <IntPair>();
            AttributeLayout = new List <RoomAttributeSO> [levelSize.x, levelSize.y];
            Rooms           = new GameObject[levelSize.x, levelSize.y];

            for (int i = 0; i < AttributeLayout.GetLength(0); i++)
            {
                for (int j = 0; j < AttributeLayout.GetLength(1); j++)
                {
                    AttributeLayout[i, j] = new List <RoomAttributeSO>();
                }
            }

            AttributeToCoordinates = new Dictionary <RoomAttributeSO, List <IntPair> >();
        }
Exemplo n.º 2
0
 public void SetRoomSize(IntPair roomSize)
 {
     RoomSize = roomSize ?? throw new Exception("Input room size is empty");
 }
Exemplo n.º 3
0
 public void SetStartingRoomCoordinates(IntPair coordinate)
 {
     StartingRoomCoordinates = coordinate ?? throw new Exception("Input StartingRoomCoordinate is empty");
 }
Exemplo n.º 4
0
 public void SetLevelSize(IntPair levelSize)
 {
     LevelSize = levelSize ?? throw new Exception("Input LevelSize is empty");
 }
Exemplo n.º 5
0
 public void CopyFrom(IntPair pair)
 {
     x = pair.x;
     y = pair.y;
 }