22 lines
524 B
C#
22 lines
524 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class UIImgFont : MonoBehaviour
|
|
{
|
|
public Dictionary<char, UIImgChar> _DictImgChars;
|
|
|
|
public void InitChars()
|
|
{
|
|
if (_DictImgChars != null)
|
|
return;
|
|
|
|
_DictImgChars = new Dictionary<char, UIImgChar>();
|
|
var childChars = GetComponentsInChildren<UIImgChar>();
|
|
foreach (var childChar in childChars)
|
|
{
|
|
_DictImgChars.Add(childChar._Char, childChar);
|
|
}
|
|
}
|
|
}
|