static LevelInfo() { foreach (var levelInfo in sheet) { if (levelInfo.id == 0) { continue; } levelInfo.type = LevelType.sheet[levelInfo.levelTypeIndex]; levelInfo.preset = LevelPreset.Find(levelInfo.id); levelInfo.entryFile = @"data\local\ui\eng\act" + (levelInfo.act + 1) + @"\" + levelInfo._entryFile + ".dc6"; foreach (string mon in levelInfo._monsters) { if (mon != null && mon != "") { levelInfo.monsters.Add(mon); } } levelInfo.soundEnv = SoundEnvironment.Find(levelInfo.soundEnvId); levelInfo.maze = LevelMazeInfo.Find(levelInfo.id); nameIndex.Add(levelInfo.name, levelInfo); idMap.Add(levelInfo.id, levelInfo); while (byAct.Count <= levelInfo.act) { byAct.Add(new List <LevelInfo>()); } byAct[levelInfo.act].Add(levelInfo); } }
public static void LoadAll() { var sw = System.Diagnostics.Stopwatch.StartNew(); Translation.Load(); SoundInfo.Load(); SoundEnvironment.Load(); ObjectInfo.Load(); BodyLoc.Load(); ExpTable.Load(); LevelType.Load(); LevelWarpInfo.Load(); LevelPreset.Load(); LevelMazeInfo.Load(); LevelInfo.Load(); OverlayInfo.Load(); MissileInfo.Load(); ItemStat.Load(); ItemRatio.Load(); ItemType.Load(); ItemPropertyInfo.Load(); ItemSet.Load(); UniqueItem.Load(); SetItem.Load(); TreasureClass.Load(); MagicAffix.Load(); CharStatsInfo.Load(); MonLvl.Load(); MonPreset.Load(); MonSound.Load(); MonStatsExtended.Load(); MonStat.Load(); SuperUnique.Load(); SkillDescription.Load(); SkillInfo.Load(); SpawnPreset.Load(); StateInfo.Load(); Debug.Log("All txt files loaded in " + sw.ElapsedMilliseconds + " ms"); }