Пример #1
0
 public override IEnumerator ToDisplay(InteractiveMessageContent content, StringBuilder builder, char?lastChar = null)
 {
     if (lastChar != null && lastChar != '\n' || !OnlyIfSignificant)
     {
         builder.Append('\n');
         content.GetComponent <Text>().text = builder.ToString();
         yield return(content.CharacterWaiterCoroutine());
     }
 }
Пример #2
0
                public override IEnumerator ToDisplay(InteractiveMessageContent content, StringBuilder builder, char?lastChar = null)
                {
                    Text textComponent = content.GetComponent <Text>();

                    foreach (char c in Message)
                    {
                        builder.Append(c);
                        textComponent.text = builder.ToString();
                        yield return(content.CharacterWaiterCoroutine());
                    }
                }
Пример #3
0
            /**
             * When starting, the inner message content will be centered horizontally. The fact that
             *   this component inherits ScrollRect helps us to clip it and align it vertically
             *   (see the Update method for more details).
             */
            protected override void Start()
            {
                base.Start();
                mask           = GetComponent <Mask>();
                messageContent = Layout.RequireComponentInChildren <InteractiveMessageContent>(this.gameObject);
                RectTransform me = GetComponent <RectTransform>();

                content = messageContent.GetComponent <RectTransform>();
                float myWidth  = me.sizeDelta.x;
                float itsWidth = content.sizeDelta.x;

                content.localPosition = new Vector2((myWidth - itsWidth) / 2, 0);
                content.sizeDelta     = new Vector2(itsWidth, content.sizeDelta.y);
            }
Пример #4
0
 public override IEnumerator ToDisplay(InteractiveMessageContent content, StringBuilder builder, char?lastChar = null)
 {
     builder.Remove(0, builder.Length);
     content.GetComponent <Text>().text = "";
     yield return(content.CharacterWaiterCoroutine());
 }
Пример #5
0
 public abstract IEnumerator ToDisplay(InteractiveMessageContent content, StringBuilder builder, char?lastChar = null);
Пример #6
0
 public override IEnumerator ToDisplay(InteractiveMessageContent content, StringBuilder builder, char?lastChar = null)
 {
     yield return(content.ExplicitWaiterCoroutine(SecondsToWait));
 }