Exemplo n.º 1
0
 public override void OnOkButton()
 {
     if (isPrompt)
     {
         if (savePrompt.Click(true) == MyPrompt.Result.OK1)
         {
             NextLevel();
         }
     }
     else if (saveFileController.OkClicked())
     {
         StartCoroutine(Transition());
     }
     menuAcceptEvent.Invoke();
 }
Exemplo n.º 2
0
    public override void OnOkButton()
    {
        if (currentState == State.MAIN)
        {
            switch (mainButtons.GetPosition())
            {
            case 0:
                NewgameClicked();
                break;

            case 1:
                LoadClicked();
                break;

            case 2:
                OptionsClicked();
                break;

            case 3:
                ControlsClicked();
                break;

            case 4:
                ChangelogClicked();
                break;

            case 5:
                QuitClicked();
                break;
            }
            menuAcceptEvent.Invoke();
        }
        else if (currentState == State.LOAD)
        {
            if (saveFileController.OkClicked())
            {
                menuAcceptEvent.Invoke();
            }
        }
        else if (currentState == State.OPTIONS)
        {
            if (optionsController.OKClicked())
            {
                menuAcceptEvent.Invoke();
            }
        }
    }