Ejemplo n.º 1
0
 protected virtual void saveClick(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     if (tb.Text == "")
     {
         return;
     }
     try
     {
         if (saves.SelectedIndex != -1)
         {
             mb = YesNoMessageBox.Show("Are you sure you want to\r\nreplace existing file: \r\n" + saves.GetSelected() + "?");
             mb.onButtonClicked += new YesNoMessageBox.ButtonClickedEventHandler(mbReplace_onButtonClicked);
         }
         else
         {
             Save();
             GUIEngine.ChangeScene(Graphics.GUI.GUIEngine.s_game, null);
             //GUIEngine.curScene = null;
         }
     }
     catch
     {
         var a = OKMessageBox.Show("Wrong filename!");
         a.onButtonClicked += new OKMessageBox.ButtonClickedEventHandler(a_onButtonClicked);
     }
 }
Ejemplo n.º 2
0
        protected virtual void _load()
        {
            //Logics.LevelEngine.Stop();
            //Logics.GameInputHandler.PlacableAreas.Clear();
            //Settings.ResetInGameSettings();
            Logics.GameLogicsHelper.InitForGame();

            IO.SaveEngine.LoadAll("Saves/" + folder + "/" + saves.GetSelected() + mask.Substring(1));

            GUIEngine.ChangeScene(Graphics.GUI.GUIEngine.s_game, "GAMESandbox");
            //GUIEngine.curScene = null;
            //Main.curState = "GAMESandbox";
        }