示例#1
0
    public void OnDelete()
    {
        m_deleteProfile = "";
        if (MyInputField != null)
        {
            m_deleteProfile   = MyInputField.text;
            MyInputField.text = "";
        }
        else
        {
            m_deleteProfile = m_savedProfiles [m_selectedIndex];
        }
        if (m_deleteProfile == "")
        {
            m_message.text = "No profile selected to delete";
            return;
        }
        if (!SaveObjManager.Instance.ProfileExists(m_deleteProfile))
        {
            m_message.text = "Profile: " + m_deleteProfile + " does not exist";
            return;
        }
        if (m_deleteProfile == "AutoSave")
        {
            m_message.text = "AutoSave cannot be deleted.";
            return;
        }
        string w = "Are you sure you want to permanently delete: " + m_deleteProfile + "?";

        w += "\n Deleted saves cannot be recovered.";

        PauseGame.DisplayWarning(w, gameObject, m_delete);
    }
示例#2
0
    public static void QuickLoad()
    {
        PauseGame.Pause(false);
        string w = "Load Last QuickSave? ";

        w += "\n All unsaved Progress will be lost.";
        PauseGame.DisplayWarning(w, Instance.m_pauseMenuUI, Instance.quickLoad, "Warning", Instance.SetFirstOption);
    }
示例#3
0
    public void OnLoad()
    {
        string w = "Load Profile: " + m_savedProfiles [m_selectedIndex] + "?";

        if (MainMenu == false)
        {
            w += "\n All unsaved Progress will be lost.";
            PauseGame.DisplayWarning(w, gameObject, m_load);
        }
        else
        {
            PauseGame.DisplayWarning(w, gameObject, m_load, "Confirmation");
        }
    }
示例#4
0
 public void OnSave()
 {
     if (MyInputField.text == "")
     {
         m_message.text = "Please enter a profile name";
         return;
     }
     if (m_savedProfiles.Contains(MyInputField.text))
     {
         string w = "Overwrite Profile: " + MyInputField.text + "?";
         PauseGame.DisplayWarning(w, gameObject, m_save);
     }
     else
     {
         m_save();
     }
 }