Created
February 22, 2016 19:38
-
-
Save sabotai/f36e20dfdd442a071446 to your computer and use it in GitHub Desktop.
in class 205 git gist example
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 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