Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. MOVEMENT
  2.  
  3. using UnityEngine;
  4. using System.Collections;
  5.  
  6. public class Movement : MonoBehaviour {
  7.  
  8. // Update is called once per frame
  9. void Update () {
  10. if(Input.GetKeyUp(KeyCode.W))
  11. {
  12. Vector3 up = new Vector3 (0, 0.2f, 0);
  13. gameObject.transform.position += up;
  14. }
  15. }
  16. }
  17.  
  18.  
  19. PRINTING
  20.  
  21. using UnityEngine;
  22. using System.Collections;
  23.  
  24. public class PrintingScript : MonoBehaviour {
  25.  
  26. // Update is called once per frame
  27. void Update () {
  28. if(Input.GetKeyDown(KeyCode.R))
  29. {
  30. print ("We pressed the R Key!");
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement