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> >(); }
public void SetRoomSize(IntPair roomSize) { RoomSize = roomSize ?? throw new Exception("Input room size is empty"); }
public void SetStartingRoomCoordinates(IntPair coordinate) { StartingRoomCoordinates = coordinate ?? throw new Exception("Input StartingRoomCoordinate is empty"); }
public void SetLevelSize(IntPair levelSize) { LevelSize = levelSize ?? throw new Exception("Input LevelSize is empty"); }
public void CopyFrom(IntPair pair) { x = pair.x; y = pair.y; }