private IEnumerator Hide(MessageControl message)
        {
            if (WaitTime > 0.0f)
            {
                yield return(new WaitForSeconds(WaitTime));
            }

            message.Deactivate();
        }
        private IEnumerator Show(MessageControl message, string text)
        {
            message.Show(text);

            if (WaitForCompletion)
            {
                while (message.IsRunning)
                {
                    yield return(null);
                }
            }

            if (AutoHide)
            {
                if (WaitForCompletion)
                {
                    yield return(Hide(message));
                }
                else
                {
                    message.StartCoroutine(Hide(message));
                }
            }
        }
Beispiel #3
0
 protected virtual void Awake()
 {
     Message = GetComponent <MessageControl>();
 }