private void CreateUnlockPopUp(Study study)
    {
        if (StudiesManager.Instance.CheckIfStudyIsUnlocked(study.GetCode()))
        {
            CreateCannotUnlockPopUp();
            return;
        }

        string text            = $"Do you want to unlock {study.GetCode()} study?";
        string button1Text     = "Yes";
        string button2Text     = "No";
        Action button1Callback = new Action(() =>
        {
            StudiesManager.Instance.UnlockStudy(
                (StudyCode)Enum.Parse(typeof(StudyCode),
                                      study.GetCode())
                );

            pressedStudyCell.Refresh();
        });

        PopUpManager.CreateDoubleButtonTextPopUp(text,
                                                 button1Text,
                                                 button2Text,
                                                 button1Callback);
    }
示例#2
0
    public void Btn_ClearDock()
    {
        string text            = $"Do you really want to clear the dock and destroy the ship?";
        string button1Text     = "Yes";
        string button2Text     = "No";
        Action button1Callback = new Action(() =>
        {
            dock.RemoveShip();

            cosmicPortUIManager.Back();
        });

        PopUpManager.CreateDoubleButtonTextPopUp(text, button1Text, button2Text, button1Callback);
    }
    private void ShowConfirmationPopUp(Planet planet)
    {
        string text            = $"Do you really want to go to {planet}?";
        string button1Text     = "Yes";
        string button2Text     = "No";
        Action button1Callback = new Action(() =>
        {
            print($"Changing to {planet} settlement");

            MySceneManager.Instance.LoadNewSettlement(planet);
        });

        PopUpManager.CreateDoubleButtonTextPopUp(text,
                                                 button1Text,
                                                 button2Text,
                                                 button1Callback);
    }