using UnityEngine; using UnityEngine.UI; using System.Globalization; namespace Auralis { public sealed class DialogueReveal:MonoBehaviour { Text label;string full;int[] starts;float clock;int visible; public bool Running=>label&&visible=starts.Length?full.Length:starts[visible];label.text=full.Substring(0,cut)+""+full.Substring(cut)+"";} public void Complete(){visible=starts.Length;if(label)label.text=full;} } public sealed partial class GameHud { DialogueReveal reveal; public bool DialogueTyping=>reveal&&reveal.Running; public bool CompleteDialogue(){if(!DialogueTyping)return false;reveal.Complete();return true;} public void AnimateDialogue(string text) { if(!modal||string.IsNullOrEmpty(text))return; Text target=null;int longest=0; foreach(var label in modal.GetComponentsInChildren()) { if(label.GetComponentInParent