Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. private bool isControlerInput()
  2. {
  3. // joystick buttons
  4. if(Input.GetKey(KeyCode.Joystick1Button0) ||
  5. Input.GetKey(KeyCode.Joystick1Button1) ||
  6. Input.GetKey(KeyCode.Joystick1Button2) ||
  7. Input.GetKey(KeyCode.Joystick1Button3) ||
  8. Input.GetKey(KeyCode.Joystick1Button4) ||
  9. Input.GetKey(KeyCode.Joystick1Button5) ||
  10. Input.GetKey(KeyCode.Joystick1Button6) ||
  11. Input.GetKey(KeyCode.Joystick1Button7) ||
  12. Input.GetKey(KeyCode.Joystick1Button8) ||
  13. Input.GetKey(KeyCode.Joystick1Button9) ||
  14. Input.GetKey(KeyCode.Joystick1Button10) ||
  15. Input.GetKey(KeyCode.Joystick1Button11) ||
  16. Input.GetKey(KeyCode.Joystick1Button12) ||
  17. Input.GetKey(KeyCode.Joystick1Button13) ||
  18. Input.GetKey(KeyCode.Joystick1Button14) ||
  19. Input.GetKey(KeyCode.Joystick1Button15) ||
  20. Input.GetKey(KeyCode.Joystick1Button16) ||
  21. Input.GetKey(KeyCode.Joystick1Button17) ||
  22. Input.GetKey(KeyCode.Joystick1Button18) ||
  23. Input.GetKey(KeyCode.Joystick1Button19) )
  24. {
  25. return true;
  26. }
  27.  
  28. // joystick axis
  29. if(Input.GetAxis("XC Left Stick X") != 0.0f ||
  30. Input.GetAxis("XC Left Stick Y") != 0.0f ||
  31. Input.GetAxis("XC Triggers") != 0.0f ||
  32. Input.GetAxis("XC Right Stick X") != 0.0f ||
  33. Input.GetAxis("XC Right Stick Y") != 0.0f )
  34. {
  35. return true;
  36. }
  37.  
  38. return false;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement