I have a problem. I am making a utility for creating procedural maps. I have a pool in the room and each room is located in the dining room. I have a way to connect the whole room together, which goes on the table and connects the neighboring rooms.
I have an enum that contains the type of rooms:
public enum RoomType { Default = 0, Building, Boss, Item, Standard, Start, }
In the connection method, I check the surroundings to find out which room it is in:
if (neighbourhood[2, 1] != null) { if (firstLevel.isOn) { if (neighbourhood[2,1].TypeOfRoom == RoomType.Start) { roomGrid[x, y].AddConnection(neighbourhood[2, 1], Location.RIGHT) } } else if (neighbourhood[2,1].TypeOfRoom != RoomType.Boss) roomGrid[x, y].AddConnection(neighbourhood[2, 1], Location.RIGHT); }
But when I check if there is a Start room type, it is always true and the connection is added.


I do not know why this is happening.
where i install TypeOfRoom: img3
source share