Advertisement
Guest User

input_controller

a guest
Feb 19th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class InputController : MonoBehaviour {
  6.  
  7. public float Vertical;
  8. public float Horizontal;
  9. public Vector2 MouseInput;
  10. public bool Fire1;
  11. public bool Reload;
  12.  
  13. void Update() {
  14. Vertical = Input.GetAxis ("Vertical");
  15. Horizontal = Input.GetAxis ("Horizontal");
  16. MouseInput = new Vector2 (Input.GetAxisRaw ("Mouse X"), Input.GetAxisRaw ("Mouse Y"));
  17. Fire1 = Input.GetButton ("Fire1");
  18. Reload = Input.GetKey(KeyCode.R);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement