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())); } }
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); } }