/// <summary> /// Determines the next zone to move the player to and returns it /// TODO: Figure out this algorithm based on flags /// </summary> /// <returns>Next zone the player should go to</returns> public Zone GetNextZone() { //Princess Rescue if (currentZone.zone == ZoneNames.ShadowTerritoryStage1) { if (flagMan.PrincessRescue()) { return(zonesSorted[ZoneNames.PrincessRescue]); } else { return(zonesSorted[ZoneNames.ShadowTerritoryStage2]); } } //War Zone and True Human Stage 1 if (currentZone.zone == ZoneNames.Battlefield) { if (flagMan.WarZone()) { return(zonesSorted[ZoneNames.WarZone]); } else if (flagMan.TrueHumanStage1()) { return(zonesSorted[ZoneNames.TrueHumanStage1]); } else { return(zonesSorted[ZoneNames.ShadowTerritoryStage1]); } } if (currentZone.zone == ZoneNames.ShadowTerritoryStage2 || currentZone.zone == ZoneNames.PrincessRescue) { return(zonesSorted[ZoneNames.FortressKeep]); } if (currentZone.zone == ZoneNames.FortressKeep) { return(zonesSorted[ZoneNames.HumanTerritoryStage1]); } if (currentZone.zone == ZoneNames.HumanTerritoryStage1) { return(zonesSorted[ZoneNames.HumanTerritoryStage2]); } if (currentZone.zone == ZoneNames.HumanTerritoryStage2) { return(zonesSorted[ZoneNames.ThroneRoom]); } if (currentZone.zone == ZoneNames.WarZone) { return(zonesSorted[ZoneNames.WarZoneStage2]); } if (currentZone.zone == ZoneNames.WarZoneStage2) { return(zonesSorted[ZoneNames.FortressKeep]); //Temporary, will change later } if (currentZone.zone == ZoneNames.TrueHumanStage1) { return(zonesSorted[ZoneNames.HumanTerritoryStage2]); //Temporary, will change later } //Code shouldn't get here Debug.Log("ZoneManager GetNextZone broke"); Debug.Break(); throw new UnityException(); }