// Update is called once per frame
    void Update()
    {
        //if profile is selected, stop updating
        menuInputPlayerOne.SetActiveButton(lP1Buttons[menuInputPlayerOne.GetIndex()]);
        if (playerOneSelectedProfile == null)
        {
            menuInputPlayerOne.Update();
        }

        menuInputPlayerTwo.SetActiveButton(lP2Buttons[menuInputPlayerTwo.GetIndex()]);
        if (playerTwoSelectedProfile == null)
        {
            menuInputPlayerTwo.Update();
        }

        menuInputPlayerThree.SetActiveButton(lP3Buttons[menuInputPlayerThree.GetIndex()]);
        if (playerThreeSelectedProfile == null)
        {
            menuInputPlayerThree.Update();
        }

        menuInputPlayerFour.SetActiveButton(lP4Buttons[menuInputPlayerFour.GetIndex()]);
        if (playerFourSelectedProfile == null)
        {
            menuInputPlayerFour.Update();
        }

        CheckProfilesLoaded();
    }
示例#2
0
    void SendActiveButton()
    {
        if (mainColumn == 2)
        {
            switch (controllerMenuInput.GetIndex() % 9)
            {
            case 0:
                controllerMenuInput.SetActiveButton(editNameButton);
                break;

            case 1:
                controllerMenuInput.SetActiveButton(editAttackButton);
                break;

            case 2:
                controllerMenuInput.SetActiveButton(editJumpButton);
                break;

            case 3:
                controllerMenuInput.SetActiveButton(editPauseButton);
                break;

            case 4:
                controllerMenuInput.SetActiveButton(editSwap1Button);
                break;

            case 5:
                controllerMenuInput.SetActiveButton(editSwap2Button);
                break;

            case 6:
                controllerMenuInput.SetActiveButton(editSwap3Button);
                break;

            case 7:
                controllerMenuInput.SetActiveButton(editSwap4Button);
                break;

            case 8:
                controllerMenuInput.SetActiveButton(editDeleteButton);
                break;
            }
        }
        else
        {
            switch (controllerMenuInput.GetIndex() % (3 + profileButtons.Count))
            {
            case 0:
                controllerMenuInput.SetActiveButton(createProfileButton);
                break;

            case 1:
                controllerMenuInput.SetActiveButton(saveButton);
                break;

            case 2:
                controllerMenuInput.SetActiveButton(exitButton);
                break;

            case 3:
                controllerMenuInput.SetActiveButton(profileButtons[0]);
                break;

            case 4:
                controllerMenuInput.SetActiveButton(profileButtons[1]);
                break;

            case 5:
                controllerMenuInput.SetActiveButton(profileButtons[2]);
                break;

            case 6:
                controllerMenuInput.SetActiveButton(profileButtons[3]);
                break;

            case 7:
                controllerMenuInput.SetActiveButton(profileButtons[4]);
                break;

            case 8:
                controllerMenuInput.SetActiveButton(exitButton);
                break;

            default:
                break;
            }
        }
    }
 // Update is called once per frame
 void Update()
 {
     controller.SetActiveButton(lButtons[controller.GetIndex()]);
     controller.Update();
 }