public static DungeonItem GetDungeonItem(string constant) { var dungeon = Instance.Dungeons[dungeonNames.IndexOf(constant)]; var ditem = new DungeonItem(dungeon); return(ditem); }
bool CheckDungeon(DungeonItem dungeon, params Func <bool>[] locations) { int count = 0; foreach (var location in locations) { if (!location()) { ++count; } } if (dungeon != DungeonItem.CASTLE && !CheckFlag("Compass", dungeon)) { --count; } if (!CheckFlag("Big Key", dungeon)) { --count; } if (!CheckFlag("Map", dungeon)) { --count; } return(count <= 0); }
public DungeonStruct(int id , ChapterLevel level){ this.level = level; this.id = id; baseData = new DungeonItem(id); this.unLocked = ToUnLockInit(); //may be not good , defalut false may be better this.passed = false; this.possessStarNum = 0; }