Ejemplo n.º 1
0
    public void MenuButtons(int id)
    {
        switch (id)
        {
        case 0:    //Первый порез
            if (lockIsGame == false)
            {
                if (cut.isGame == false && forTeach == false)
                {
                    Restart();
                }
                cut.DownCut();
            }
            break;

        case 1:    //Кнопка открытия маркета
            PlaySound(6);
            lockIsGame = true;
            menu.SetBool("isMarket", true);
            levelHunt.SetBool("isMarket", true);
            break;

        case 2:    //Кнопка по центру (начало игры)
            if (!lockIsGame && !cut.isGame && !forTeach)
            {
                Restart();
            }
            break;

        case 3:    //Кнопка открытия настроек
            PlaySound(6);
            lockIsGame = true;
            menu.SetBool("isSettings", true);
            levelHunt.SetBool("isSettings", true);
            break;
        }
    }