using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;

public class TextAnimation : MonoBehaviour
{
    #region Fields
    [SerializeField, TextArea] private string _text;
    [SerializeField] private TextMeshProUGUI _uitText;
    #endregion Fields

    #region Properties
    #endregion Properties

    #region Methods
    void Start()
    {
        StartCoroutine(TextAniamtion());
    }

    IEnumerator TextAniamtion()
    {
        _uitText.text = "";
        for (int i = 0; i < _text.Length; i++)
        {
            _uitText.text += _text[i];
            yield return null;
        }
    }
    #endregion Methods
}
