Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private bool isControlerInput()
- {
- // joystick buttons
- if(Input.GetKey(KeyCode.Joystick1Button0) ||
- Input.GetKey(KeyCode.Joystick1Button1) ||
- Input.GetKey(KeyCode.Joystick1Button2) ||
- Input.GetKey(KeyCode.Joystick1Button3) ||
- Input.GetKey(KeyCode.Joystick1Button4) ||
- Input.GetKey(KeyCode.Joystick1Button5) ||
- Input.GetKey(KeyCode.Joystick1Button6) ||
- Input.GetKey(KeyCode.Joystick1Button7) ||
- Input.GetKey(KeyCode.Joystick1Button8) ||
- Input.GetKey(KeyCode.Joystick1Button9) ||
- Input.GetKey(KeyCode.Joystick1Button10) ||
- Input.GetKey(KeyCode.Joystick1Button11) ||
- Input.GetKey(KeyCode.Joystick1Button12) ||
- Input.GetKey(KeyCode.Joystick1Button13) ||
- Input.GetKey(KeyCode.Joystick1Button14) ||
- Input.GetKey(KeyCode.Joystick1Button15) ||
- Input.GetKey(KeyCode.Joystick1Button16) ||
- Input.GetKey(KeyCode.Joystick1Button17) ||
- Input.GetKey(KeyCode.Joystick1Button18) ||
- Input.GetKey(KeyCode.Joystick1Button19) )
- {
- return true;
- }
- // joystick axis
- if(Input.GetAxis("XC Left Stick X") != 0.0f ||
- Input.GetAxis("XC Left Stick Y") != 0.0f ||
- Input.GetAxis("XC Triggers") != 0.0f ||
- Input.GetAxis("XC Right Stick X") != 0.0f ||
- Input.GetAxis("XC Right Stick Y") != 0.0f )
- {
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement