public static void CreateNextMenu() { var mission = game.MenuType; var save = game.Save; finishAndLoad(new Game(save, MapCache.FindMap(mission, save), mission, InteractionMode.INGAME)); }
public static void CreateFirst() { var mission = MissionType.MAIN_MENU; var mode = InteractionMode.NONE; var map = MapCache.FindMap(mission, 0, Program.SharedRandom); if (!string.IsNullOrEmpty(Program.Piece)) { mode = InteractionMode.INGAME; map = MapType.FromPiece(PieceManager.GetPiece(Program.Piece)); mission = MissionType.TEST; } else if (!string.IsNullOrEmpty(Program.MapType)) { mode = InteractionMode.INGAME; map = MapCache.Types[Program.MapType]; mission = map.MissionTypes.Length > 0 ? map.MissionTypes[0] : MissionType.TEST; } if (Program.StartEditor) { mode = InteractionMode.EDITOR; } game = new Game(GameSaveManager.DefaultSave.Copy(), map, mission, mode); game.Load(); }
public static void CreateNew(GameSave save, MissionType type = MissionType.NORMAL, InteractionMode mode = InteractionMode.INGAME, MapType custom = null, bool loadStatsMap = false) { if (loadStatsMap) { type = save.CurrentMission; try { custom = MapType.FromSave(save); } catch (System.IO.FileNotFoundException) { Log.Warning($"Unable to load saved map of save '{save.SaveName}'. Using a random map."); } } finishAndLoad(new Game(save, custom ?? MapCache.FindMap(type, save.Level, new Random(save.Seed + save.Level)), type, mode)); }
public static void CreateNext(MissionType mission, InteractionMode mode = InteractionMode.INGAME) { var save = game.Save; finishAndLoad(new Game(save, MapCache.FindMap(mission, save), mission, mode)); }
public static void CreateMainMenu() { const MissionType mission = MissionType.MAIN_MENU; finishAndLoad(new Game(GameSaveManager.DefaultSave, MapCache.FindMap(mission, 0, Program.SharedRandom), mission, InteractionMode.NONE)); }