using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ImageNum : MonoBehaviour
{
    [SerializeField] Image mImgOnes;
    [SerializeField] Image mImgTens;
    [SerializeField] Image mImgHundreds;

    public void SetNum(int pNum)
    {
        pNum = pNum % 1000;
        string tNumStr = pNum.ToString("D3");

        mImgHundreds.sprite = ResourceManager.Instance.LoadRes<Sprite>(Const.Path.GetNumPicA(tNumStr[0].ToString()));
        mImgTens.sprite = ResourceManager.Instance.LoadRes<Sprite>(Const.Path.GetNumPicA(tNumStr[1].ToString()));
        mImgOnes.sprite = ResourceManager.Instance.LoadRes<Sprite>(Const.Path.GetNumPicA(tNumStr[2].ToString()));
    }
}