Esempio n. 1
0
 public static void LoadTheme(DungeonThemeType theme)
 {
     if (!ThemeLoaded(theme))
     {
         Dictionary <DungeonDecoCategoryType, List <string> > dictionary = new Dictionary <DungeonDecoCategoryType, List <string> >(new DungeonDecoCategoryTypeBoxAvoidanceComparer());
         s_decosPerThemePerCategory.Add(theme, dictionary);
         for (int i = 0; i < ConfigDungeons.DUNGEON_DECO_CATEGORY_TYPES.Count; i++)
         {
             DungeonDecoCategoryType key = ConfigDungeons.DUNGEON_DECO_CATEGORY_TYPES[i];
             dictionary.Add(key, new List <string>());
             UnityEngine.Object[] objArray = ResourceUtil.LoadResourcesAtPath(string.Concat(new object[] { ConfigDungeons.DUNGEON_DECO_RESOURCE_PATH, "/", theme, "/", key }));
             for (int j = 0; j < objArray.Length; j++)
             {
                 string   name      = objArray[j].name;
                 object[] objArray2 = new object[] { ConfigDungeons.DUNGEON_DECO_RESOURCE_PATH, "/", theme, "/", key, "/", name };
                 s_decosPerThemePerCategory[theme][key].Add(string.Concat(objArray2));
             }
         }
         s_loadedThemes.Add(theme);
     }
 }
Esempio n. 2
0
 public static string GetRandomDeco(DungeonThemeType theme, DungeonDecoCategoryType decoCategory)
 {
     return(LangUtil.GetRandomValueFromList <string>(s_decosPerThemePerCategory[theme][decoCategory]));
 }