Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 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 :click;
  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. }
  28.  
  29. {
  30. else if(Input.GameKey(moveleft))
  31. }
  32. {
  33. else if(Input.GameKey(moveright))
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement