Skip to content

Instantly share code, notes, and snippets.

@sabotai
Created February 8, 2017 21:40
Show Gist options
  • Select an option

  • Save sabotai/690be125022a17167e1874be463418ac to your computer and use it in GitHub Desktop.

Select an option

Save sabotai/690be125022a17167e1874be463418ac to your computer and use it in GitHub Desktop.
GD205-S17-W2
using UnityEngine;
using System.Collections;
public class BasicConditionals : MonoBehaviour {
public bool goToWork;
public GameObject mover;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Debug.Log("game object is at ... " + mover.transform.position);
if (Input.GetKeyDown("space")){
mover.transform.position += new Vector3(0,-5, 0);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment