protected override void Run(Player player) { WindowPanelBuilder wpb = WindowPanelBuilder.Create(Data().Name()); var saveonexit = LSys.tem.options["saveonexit"]; saveonexit.AddOption(wpb.panel); wpb.panel.AddButton("to main menu", () => { if (saveonexit.Bool()) { LoadSaveMgmt.UpdateSave("quicksave", "quick save"); } SceneManager.LoadScene(0, LoadSceneMode.Single); }); wpb.panel.AddButton("exit game", () => { if (saveonexit.Bool()) { LoadSaveMgmt.UpdateSave("quicksave", "quick save"); } Application.Quit(); }); wpb.AddClose(); wpb.Finish(); }
public override IEnumerator FinishRound(Player player) { //TODO Autosave only for human player //save if (LSys.tem.options["autosave"].Bool()) { yield return(GameMgmt.Get().load.ShowSubMessage($"Save auto save")); LoadSaveMgmt.UpdateSave($"autosave{player.id}", $"Auto save {player.name}"); } yield return(null); }
protected override int ValueAct(Player player, string element, string sett) { return(LoadSaveMgmt.GetAllSaves().Count); }