public override IEnumerator <YieldInstruction> BeginGame(int zoneID, ulong seed, DungeonStakes stakes, bool recorded, bool noRestrict) { MidAdventure = true; Stakes = stakes; if (recorded) { DataManager.Instance.BeginPlay(DataManager.ROGUE_PATH + DataManager.Instance.Save.StartDate + DataManager.QUICKSAVE_EXTENSION, zoneID, !Seeded); } yield break; }
public override IEnumerator <YieldInstruction> BeginGame(int zoneID, ulong seed, DungeonStakes stakes, bool recorded, bool noRestrict) { ZoneData zone = DataManager.Instance.GetZone(zoneID); //restrict team size/bag size/etc if (!noRestrict) { yield return(CoroutineManager.Instance.StartCoroutine(RestrictTeam(zone, false))); } MidAdventure = true; Stakes = stakes; //create a copy (from save and load) of the current state and mark it with loss DataManager.Instance.SaveMainGameState(); GameState state = DataManager.Instance.LoadMainGameState(); if (state != null) { if (Stakes == DungeonStakes.Risk) { LossPenalty(state.Save); } DataManager.Instance.SaveGameState(state); } //set everyone's levels and mark them for backreferral if (!noRestrict) { yield return(CoroutineManager.Instance.StartCoroutine(RestrictLevel(zone, false))); } RestartLogs(seed); RescuesLeft = zone.Rescues; if (recorded) { DataManager.Instance.BeginPlay(DataManager.QUICKSAVE_FILE_PATH, zoneID, false); } }
public abstract IEnumerator <YieldInstruction> BeginGame(int zoneID, ulong seed, DungeonStakes stakes, bool recorded, bool noRestrict);