Advertisement
Guest User

Untitled

a guest
Jul 9th, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. function PlayerStateController()
  2. {
  3. if ((Input.GetAxis("Vertical") !=0 || Input.GetAxis("Horizontal") !=0))
  4. {
  5. if (Input.GetButton("Sprint")&&!Input.GetButton("Fire2" && PlayerBossController.isGrounded && CanSprint == false)
  6. (
  7. PlayerState = 2;
  8. AimingIn = false;
  9. }
  10.  
  11. else if (Input.GetMouseButton(1) && !Input.GetButton("Sprint"))
  12. {
  13. PlayerState = 3;
  14. AimingIn = true;
  15. }
  16. else
  17. {
  18. PlayerState = 1;
  19. AimingIn = false;
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement