Well, i changed Roomdungeons quite a bit on my version here at home, i am unsure if this version is encapsulated enough for public usage.
I separated the classes into a separate file added some specialities that control some things like:
So it is a pretty neat generator but now requires some prefabs for the portal/pathway trigger spawning and stuff, defining a dungeon is also really cumbersome and errorprone at this point:
private Dictionary<string,LevelSetup> levels = new Dictionary<string, LevelSetup>(){
//private List<LevelSetup> levels = new List<LevelSetup>(){
//game levels idEnd displayName displayNameSub sceneToLoadName type isDebug
{ "brawl", new LevelSetup( "n/a", "Brawl", "Brawl Map 1", "05 Brawl", LevelType.PreplacedBlockParsing, dParamsHall1 )}, // start of Game
{ "start", new LevelSetup( "n/a", "Chapter1", "A Final Beginning", "01 Beginning", LevelType.PreplacedBlockParsing, dParamsHall1 )}, // start of Game
{ "boss1", new LevelSetup( "hub00", "Susu", "Ashes To Ashes", "04 Boss1", LevelType.PreplacedBlockParsing, dParamsHall1 )}, // boss 1
{ "hall1", new LevelSetup( "hall2", "Halls", "Floor 1", "03 DungeonLevel", LevelType.GenRoomTemplate, dParamsHall1 )}, // generic Floor
{ "hall2", new LevelSetup( "boss1", "Halls", "Floor 2", "03 DungeonLevel", LevelType.GenRoomTemplate, dParamsHall1 )}, // generic Floor
{ "hub00", new LevelSetup( "n/a", "Hub", "A Forsaken Outpost", "02 HubRoom", LevelType.PreplacedBlockParsing, dParamsHall1 )}, // generic Floor
{ "hallH", new LevelSetup( "hall2", "Halls", "Floor 1", "03 DungeonLevel", LevelType.GenRoomTemplate, dParamsHallH )}, // generic Floor
//debug levels
{ "debug", new LevelSetup( "n/a", "Debug", "Debugging", "Debug", LevelType.PreplacedBlockParsing, dParamsTestEast )},
{ "light", new LevelSetup( "n/a", "Lighttest", "NormalMaps", "LightTest", LevelType.None, dParamsTestEast )}
};
//ORDER OF THESE STATIC INITIALIZERS IS CRUCIAL!
private static PathRole rEntr = PathRole.Entrance;
private static PathRole rExit = PathRole.Exit;
private static PathRole rMand = PathRole.Mandatory;
private static PathRole rSide = PathRole.Sidetrack;
private static PathRole rHide = PathRole.Hidden;
private static PortalDirection pA = PortalDirection.Any;
private static PortalDirection pX = PortalDirection.None;
private static PortalDirection pN = PortalDirection.North;
private static PortalDirection pE = PortalDirection.East;
private static PortalDirection pS = PortalDirection.South;
private static PortalDirection pW = PortalDirection.West;
private static PortalTemplate defaultPortalTemplateAny = new PortalTemplate( "default", PathRole.Mandatory, PortalDirection.Any );
private static PortalTemplate defaultPortalTemplateNone = new PortalTemplate( "default", PathRole.Mandatory, PortalDirection.None );
private static PortalTemplate defaultPortalTemplateNorth = new PortalTemplate( "default", PathRole.Mandatory, PortalDirection.North );
private static PortalTemplate defaultPortalTemplateEast = new PortalTemplate( "default", PathRole.Mandatory, PortalDirection.East );
private static PortalTemplate defaultPortalTemplateSouth = new PortalTemplate( "default", PathRole.Mandatory, PortalDirection.West );
private static PortalTemplate defaultPortalTemplateWest = new PortalTemplate( "default", PathRole.Mandatory, PortalDirection.South );
private static List<PortalTemplate> testGatewayTemplate = new List<PortalTemplate>() { defaultPortalTemplateWest, defaultPortalTemplateAny };
private static DungeonParameters dParamsTestEast = new DungeonParameters( 80, 50, 11, testGatewayTemplate );
private static DungeonParameters dParamsTestSouth = new DungeonParameters( 80, 50, 11, testGatewayTemplate );
//first has to be entrance and a direction
private static PortalTemplate portalHall1p1 = new PortalTemplate( "hub00", rEntr, pE );
private static PortalTemplate portalHall1p2 = new PortalTemplate( "hall2", rExit, pA );
private static PortalTemplate portalHall1p3 = new PortalTemplate( "boss1", rSide, pA );
private static List<PortalTemplate> portalsHall1 = new List<PortalTemplate>() { portalHall1p1, portalHall1p2, portalHall1p3 };
private static DungeonParameters dParamsHall1 = new DungeonParameters( 80, 50, 11, portalsHall1 );
private static PortalTemplate portalHallHp1 = new PortalTemplate( "hub00", rEntr, pS );
private static PortalTemplate portalHallHp2 = new PortalTemplate( "boss1", rExit, pA );
private static List<PortalTemplate> portalsHallH = new List<PortalTemplate>() { portalHallHp1, portalHallHp2 };
private static DungeonParameters dParamsHallH = new DungeonParameters( 80, 50, 11, portalsHallH );
// ORDER END