Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MOVEMENT
- using UnityEngine;
- using System.Collections;
- public class Movement : MonoBehaviour {
- // Update is called once per frame
- void Update () {
- if(Input.GetKeyUp(KeyCode.W))
- {
- Vector3 up = new Vector3 (0, 0.2f, 0);
- gameObject.transform.position += up;
- }
- }
- }
- PRINTING
- using UnityEngine;
- using System.Collections;
- public class PrintingScript : MonoBehaviour {
- // Update is called once per frame
- void Update () {
- if(Input.GetKeyDown(KeyCode.R))
- {
- print ("We pressed the R Key!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement