// Update is called once per frame void Update() { if (state != null) { if (!state.Run()) { state = null; GetComponentInParent <UnityStandardAssets.Characters.FirstPerson.FirstPersonController>().enabled = true; GetComponentInChildren <TextMesh>().text = ""; mesh.enabled = false; } } }
// Update is called once per frame void Update() { if (!is_enabled) { return; } mesh.enabled = true; GetComponentInParent <UnityStandardAssets.Characters.FirstPerson.FirstPersonController>().enabled = false; if (state != null) { if (!state.Run()) { state = null; Application.Quit(); } } }
// Use this for initialization void Start() { state = new PrintingState(GetComponentInChildren <TextMesh>(), 15f); mesh = GetComponent <MeshRenderer>(); mesh.enabled = false; }
// Use this for initialization void Start() { state = new PrintingState(GetComponentInChildren <TextMesh>(), 15f); mesh = GetComponent <MeshRenderer>(); GetComponentInParent <UnityStandardAssets.Characters.FirstPerson.FirstPersonController>().enabled = false; }