public void SpeechTrigger() { speechUI.SetMessage(speech.message); if (objectToSet != null) { speechUI.ObjectsToSet(objectToSet); } }
void Update() { if (end.color.a < 0.98f) { end.color += new Color(0.0f, 0.0f, 0.0f, 0.01f); end.gameObject.SetActive(true); fontChange.font = fontAsset; fontChange.color = Color.white; } else { speechUI.SetMessage(GetComponent <Speech>().message, "End"); speechUI.gameObject.SetActive(true); gameObject.SetActive(false); } }