Пример #1
0
    private void OnClickTest()
    {
        if (EventSystem.current.currentSelectedGameObject != null)
        {
            switch (EventSystem.current.currentSelectedGameObject.name)
            {
            case "BackToMenu":
                Scenemg.Menu();
                break;

            case "PlayButton":
                Scenemg.LevelSelection();
                break;

            case "Level1":
                Scenemg.Level1();
                break;

            /*case "Level2":
             *  Scenemg.Level2();
             *  break;*/
            case "BackToSelection":
                Scenemg.LevelSelection();
                break;

            case "RetryLevel":
                Scenemg.Level1();
                break;

            /*case "RetryLevel2":
             *  Scenemg.Level2();
             *  break;*/
            case "Next":
                UI.ChangeLevelSelection1();
                break;

            case "Previous":
                UI.ChangeLevelSelection2();
                break;

            default:
                break;
            }
        }
    }