public static void SaveProgression(BinaryWriter BW, Roster PlayerRoster) { BW.Write(BattleMap.NextMapType); BW.Write(BattleMap.NextMapPath); BW.Write(BattleMap.ClearedStages); BW.Write(Constants.Money); BW.Write(BattleMap.DicGlobalVariables.Count); foreach (KeyValuePair <string, string> GlobalVariable in BattleMap.DicGlobalVariables) { BW.Write(GlobalVariable.Key); BW.Write(GlobalVariable.Value); } BW.Write(BattleMap.DicRouteChoices.Count); foreach (KeyValuePair <string, int> RouteChoice in BattleMap.DicRouteChoices) { BW.Write(RouteChoice.Key); BW.Write(RouteChoice.Value); } PlayerRoster.SaveTeam(BW); BW.Write(SystemList.ListPart.Count); foreach (string ActivePart in SystemList.ListPart.Keys) { BW.Write(ActivePart); } }
private void SaveProgression() { //Create the Part file. FileStream FS = new FileStream("SRWE Save.bin", FileMode.Create, FileAccess.Write); BinaryWriter BW = new BinaryWriter(FS); BW.Write(BattleMap.NextMapType); BW.Write(BattleMap.NextMapPath); BW.Write(BattleMap.DicRouteChoices.Count); foreach (KeyValuePair <string, int> RouteChoice in BattleMap.DicRouteChoices) { BW.Write(RouteChoice.Key); BW.Write(RouteChoice.Value); } PlayerRoster.SaveTeam(BW); BW.Write(SystemList.ListPart.Count); foreach (string ActivePart in SystemList.ListPart.Keys) { BW.Write(ActivePart); } FS.Close(); BW.Close(); }