Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class PlayerControl : MonoBehaviour {
  6.  
  7. var moveUP : Keycode;
  8. var moveDown :keycode;
  9. var moveLeft :keycode;
  10. Var moveright :Keycode;
  11.  
  12. var speed : float = 10;
  13.  
  14.  
  15. // Update is called once per frame
  16. void Update() {
  17.  
  18.  
  19. if (input.GetKey(moveUp))
  20.  
  21.  
  22.  
  23. }
  24. else if(input.GetKey(moveDown))
  25. {
  26. }
  27. else
  28. {
  29. else if(Input.GameKey(moveleft))
  30. }
  31. {
  32. else if(Input.GameKey(moveright))
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement