Skip to content

Instantly share code, notes, and snippets.

@sabotai
Created February 22, 2016 19:38
Show Gist options
  • Save sabotai/f36e20dfdd442a071446 to your computer and use it in GitHub Desktop.
Save sabotai/f36e20dfdd442a071446 to your computer and use it in GitHub Desktop.
in class 205 git gist example
using UnityEngine;
using System.Collections;
public class first : MonoBehaviour {
public GameObject textThing;
// Use this for initialization
void Start () {
textThing.GetComponent<TextMesh> ().text = "in quotation marks";
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown ("space")) {
textThing.GetComponent<TextMesh> ().color = new Color (0.5f, 0.2f, 1f, 1f);
}
if (Input.GetKeyDown (KeyCode.A)) {
textThing.GetComponent<TextMesh> ().color = Color.cyan;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment