示例#1
0
    public static float GetAxis(AxisPad inputPad, AxisKeyboard inputKeyboard)
    {
        float pad = Input.GetAxis(inputPad.ToString());

        if (pad != 0)
        {
            return(pad);
        }
        else
        {
            return(Input.GetAxis(inputKeyboard.ToString()));
        }
    }
示例#2
0
 public void ToggleControls()
 {
     if (MovimentoPlayer.joystickToggle == 2)
     {
         MovimentoPlayer.joystickToggle = 3;
         BoomButton.SetActive(false);
         ButtonsController.SetActive(true);
     }
     else if (MovimentoPlayer.joystickToggle == 3)
     {
         MovimentoPlayer.joystickToggle = 1;
         ButtonsController.SetActive(false);
         AxisPad.SetActive(true);
     }
     else if (MovimentoPlayer.joystickToggle == 1)
     {
         MovimentoPlayer.joystickToggle = 2;
         ButtonsController.SetActive(false);
         AxisPad.SetActive(false);
         BoomButton.SetActive(true);
     }
 }