Created
September 5, 2017 16:18
-
-
Save sabotai/237e12d937d0f35b51d91d8eb6aa9316 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Basic3D : MonoBehaviour { | |
public GameObject mover; | |
public Vector3 movementAmount; | |
// Use this for initialization | |
void Start () { | |
movementAmount = new Vector3 (1, 0, 0); | |
} | |
// Update is called once per frame | |
void Update () { | |
if (Input.GetKeyDown(KeyCode.Space)) { | |
Debug.Log ("true"); | |
mover.transform.position += movementAmount; | |
} else { | |
Debug.Log ("false"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment