コード例 #1
0
 void OnMouseDown()
 {
     if (currentState == StartMenuController.menuStates.actived)
     {
         currentState = StartMenuController.menuStates.deactived;
     }
 }
コード例 #2
0
    void Update()
    {
        if (Input.GetButtonDown("Cancel/Menu Button"))
        {
            Debug.Log("Se cerrará el juego");
#if UNITY_EDITOR
            // Application.Quit() does not work in the editor so
            // UnityEditor.EditorApplication.isPlaying need to be set to false to end the game
            UnityEditor.EditorApplication.isPlaying = false;
#else
            Application.Quit();
#endif
        }
        else if (!Input.GetButtonDown("Cancel/Menu Button") &&
                 !Input.GetButton("Cancel/Menu Button") &&
                 !Input.GetButtonUp("Cancel/Menu Button"))
        {
            if (Input.anyKey && currentState == StartMenuController.menuStates.actived)
            {
                currentState = StartMenuController.menuStates.deactived;
            }
            else if (!Input.anyKey && currentState == StartMenuController.menuStates.deactived)
            {
                // Retornar el botó a estat “no polsat”
                anim.SetBool("active", false);
                currentState = StartMenuController.menuStates.actived;
                stateManager.changeToMainMenu();
            }
        }
    }
コード例 #3
0
 public void OnGoBackMode()
 {
     currentStatus = menuStates.Return;
 }
コード例 #4
0
 public void OnMenuStartMode()
 {
     Debug.Log("you clicked the menu");
     currentStatus = menuStates.Main;
 }
コード例 #5
0
 public void OnRumMode()
 {
     Debug.Log("you clicked the rum one");
     currentStatus = menuStates.Spirituose;
 }
コード例 #6
0
ファイル: Add_Rum_Menu.cs プロジェクト: tschongov/Medida18
 public void OnSodaMode()
 {
     emptyGlas.SetActive(false);
     fullGlas.SetActive(true);
     currentStatus = menuStates.Return;
 }
コード例 #7
0
 void Start()
 {
     currentState = menuStates.actived;
 }
コード例 #8
0
ファイル: Add_Rum_Menu.cs プロジェクト: tschongov/Medida18
 public void OnSoftdrinksMode()
 {
     currentStatus = menuStates.Softdrinks;
 }
コード例 #9
0
ファイル: Add_Rum_Menu.cs プロジェクト: tschongov/Medida18
 public void OnIceMode()
 {
     iceCubes.SetActive(true);
     currentStatus = menuStates.Return;
     iceDialogue.SetActive(true);
 }
コード例 #10
0
ファイル: Add_Rum_Menu.cs プロジェクト: tschongov/Medida18
 public void OnSucreMode()
 {
     jigger2.SetActive(true);
     currentStatus = menuStates.Return;
 }
コード例 #11
0
ファイル: Add_Rum_Menu.cs プロジェクト: tschongov/Medida18
 public void OnRumMode()
 {
     currentStatus = menuStates.Return;
     counts_Field.SetActive(true);
 }
コード例 #12
0
 public void setMenuState(menuStates s)
 {
     State = s;
 }