public void StartShow(string stringText, float time) { text = GetComponent <Text>(); this.text.text = stringText; text.color = new Color(text.color.r, text.color.g, text.color.b, 0); state = FadeInOutTextState.FADE_IN; mTime = time / 2; if (mTime < 0.1f) { mTime = 0.1f; } }
// Use this for initialization void Start() { text = GetComponent <Text>(); text.color = new Color(text.color.r, text.color.g, text.color.b, 0); state = FadeInOutTextState.NONE; }