Пример #1
0
        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();
        }
Пример #2
0
        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);
        }
Пример #3
0
 protected override int ValueAct(Player player, string element, string sett)
 {
     return(LoadSaveMgmt.GetAllSaves().Count);
 }