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()); } }
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()); } }
/** * 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); }
public override IEnumerator ToDisplay(InteractiveMessageContent content, StringBuilder builder, char?lastChar = null) { builder.Remove(0, builder.Length); content.GetComponent <Text>().text = ""; yield return(content.CharacterWaiterCoroutine()); }
public abstract IEnumerator ToDisplay(InteractiveMessageContent content, StringBuilder builder, char?lastChar = null);
public override IEnumerator ToDisplay(InteractiveMessageContent content, StringBuilder builder, char?lastChar = null) { yield return(content.ExplicitWaiterCoroutine(SecondsToWait)); }