コード例 #1
0
    private void NavigateTo(int menuIndex)
    {
        switch (menuIndex)
        {
        // 0 && default case = Main Menu
        default:
        case 0:
            desiredMenuPosition = Vector3.zero;
            menuCam.BackToMainMenu();
            break;

        //1  = Play Menu
        case 1:
            desiredMenuPosition = Vector3.right * 1280;
            menuCam.MoveToLevel();
            break;

        //2 = Shop MEnu
        case 2:
            desiredMenuPosition = Vector3.left * 1280;
            menuCam.MoveToShop();

            break;
        }
    }
コード例 #2
0
ファイル: Menu_Scene.cs プロジェクト: itsTripp/Code-Samples
    private void NavigateTo(int menuIndex)
    {
        switch (menuIndex)
        {
        //Case 0 and Default = Main Menu
        default:
        case 0:
            desiredMenuPosition = Vector3.zero;
            menuCam.BackToMainMenu();
            break;

        //Case 1 = LevelSelect
        case 1:
            desiredMenuPosition = Vector3.right * 1080;
            menuCam.MoveToLevel();
            break;

        //Case 2 = Shop
        case 2:
            desiredMenuPosition = Vector3.left * 1080;
            menuCam.MoveToShop();
            break;

        //Case 3 = Options
        case 3:
            desiredMenuPosition = Vector3.down * -1922;
            break;

        //Case 4 = Credits
        case 4:
            desiredMenuPosition = new Vector3(-1080, 1922, 0);
            break;
        }
    }
コード例 #3
0
    void NavigateTo(int menuIndex)
    {
        switch (menuIndex)
        {
        case 0:     // main menu
            desiredMenuPosition = Vector3.zero;
            menuCamera.BackToMainMenu();
            break;

        case 1:     // play menu
            desiredMenuPosition = Vector3.right * 1280;
            menuCamera.MoveToLevel();
            break;

        case 2:     // shop menu
            desiredMenuPosition = Vector3.left * 1280;
            menuCamera.MoveToShop();
            break;
        }
    }
コード例 #4
0
    private void NavigateTo(int menuIndex)
    {
        switch (menuIndex)
        {
        default:
        case 0:
            desiredMenuPosition = Vector3.zero;
            menuCamera.BackToMainMenu();
            break;

        case 1:
            desiredMenuPosition = Vector3.right * 1280;
            menuCamera.MoveToLevel();
            break;

        case 2:
            desiredMenuPosition = Vector3.left * 1280;
            menuCamera.MoveToShop();
            break;
        }
    }