Ejemplo n.º 1
0
 //On Click Mode// Receive a Value
 /// <summary>
 /// Claim a Value into Unity inspector!!!
 /// </summary>
 /// <param name="ButtonValue"></param>
 public void ClickButton(int ButtonValue)
 {
     count_buttons = ButtonValue;
     Check_Buttons();
     //For security
     if (count_buttons != 3)
     {
         Panel_options_menu.SetActive(false);
     }
     if (count_buttons != 2)
     {
         panel_Credits.SetActive(false);
     }
 }
Ejemplo n.º 2
0
    void Check_Buttons()
    {
        Debug.Log(count_buttons);
        switch (count_buttons)
        {
        case 0:
            Panel_options_menu.SetActive(false);
            panel_Credits.SetActive(false);
            Panel_Achieve.SetActive(false);
            break;

        case 1:
            SceneManager.LoadScene("Endless");
            break;

        case 2:
            panel_Credits.SetActive(true);
            break;

        case 3:
            SceneManager.LoadScene("Shop");
            break;

        case 4:
            Application.Quit();
            break;

        case 5:
            Panel_Achieve.SetActive(true);
            break;

        case 6:
            SceneManager.LoadScene("Dev");
            break;
        }
    }