コード例 #1
0
    // 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
    // Update is called once per frame
    void Update()
    {
        if (!started)
        {
            Start();
        }

        SendActiveButton();

        controllerMenuInput.Update();

        fTimeSinceLastMove += Time.deltaTime;
        if (fTimeSinceLastMove > fTimeBetweenMoves)
        {
            fTimeSinceLastMove = 0;
            if (GamePad.GetAxis(GamePad.Axis.LeftStick, GamePad.Index.Any).x > 0)
            {
//				if( mainColumn == 2 )
//					mainColumn = 0;

                if (mainColumn == 0)
                {
                    mainColumn = 2;
                }
            }
            if (GamePad.GetAxis(GamePad.Axis.LeftStick, GamePad.Index.Any).x < 0)
            {
                //mainColumn--;
                if (mainColumn == 2)
                {
                    mainColumn = 0;
                }

//				if( mainColumn == 0 )
//					mainColumn = 2;
            }
        }
        //if( loadedProfile != null) print ( loadedProfile.name );
    }
コード例 #3
0
 // Update is called once per frame
 void Update()
 {
     controller.SetActiveButton(lButtons[controller.GetIndex()]);
     controller.Update();
 }