using IVDataFormat; using IVServerFormat; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; using System.Collections; public class ProfileMgr : MonoBehaviour { #region Const private static ProfileMgr curMgr = null; #endregion [SerializeField] private EScrController escrTitle, escrIcon; #region UI public Canvas canvasUI; private Transform LeftPanel; private Canvas RightPanel; private GameObject LeftIcon, LeftTitle; private GameObject RightIcon, RightTitle; // 왼쪽 UI private TextMeshProUGUI txtInfo; //공용 private Image selectIconImage; private Image imgIconClearStamp, imgTitleClearStamp; private TextMeshProUGUI txtIconName, txtIconCondition, txtIconPath; // 이름, 조건, 획득처 private TextMeshProUGUI txtTitleName; private GraphicsColorSetter txtTitleNameColorSetter; private TextMeshProUGUI txtTitleEffect, txtTitleDesc, txtTitleCondition, txtTitlePath; // 이름, 효과, 효과설명, 조건, 획득처 private TextMeshProUGUI txtIconSldValue, txtTitleSldValue; private Button btnIconEquip, btnTitleEquip; private Slider sldIcon, sldTitle; private ParticleSystem iconStamp, titleStmap; // 오른쪽 UI private TextMeshProUGUI txtProfile; private TextMeshProUGUI txtCurTitle; private TextMeshProUGUI txtCurTitleName; private GraphicsColorSetter txtCurTitleNameColorSetter; //private Image IconLine, TitleLine; private Button btnTabIcon, btnTabTitle; private RectTransform TabIconBadge, TabTitleBadge; private RectTransform imgIconSelect, imgTitleSelect; private RectTransform[] contentBadge; private RectTransform IconEquipBadge, TitleEquipBadge; private Button[] btnContents; private Image[] imgHighlights; [SerializeField] private GameObject ProfileBadge; #endregion #region Variables private bool bReLocalize = true; private bool bReLocalizeTitle, bReLocalizeIcon = false; private int iloading; private int iSelectTab; private int iSelectContent; private int iIconSelect; private int iTitleSelect; private int IconBadgeCnt = 0; private int[] TitleBadgeCnt = new int[5]; #endregion private EnhancedUI.SmallList titles; private int[] titleIds; private int[] contentSize; private nIdCnt titleData = null; private nIdCnt iconData = null; private nIdCnt titleEquipData = null; private nIdCnt iconEquipData = null; private nAchivement achiveIcon = new nAchivement(); private nAchivement achiveTitle = new nAchivement(); #region Base private void Awake() { curMgr = this; } private void Start() { iloading--; } public static void SLocalize(bool bmain) { if (curMgr != null) curMgr.Localize(bmain); } private void Localize(bool bmain) { if (bmain) { Init(); } else { bReLocalize = false; LeftPanel = canvasUI.transform.Find("canvasLeftPn"); RightPanel = canvasUI.transform.Find("canvasRightPn").GetComponent(); LeftIcon = LeftPanel.Find("PlayerIcon").gameObject; LeftTitle = LeftPanel.Find("PlayerTitle").gameObject; RightIcon = RightPanel.transform.Find("PlayerIcon").gameObject; RightTitle = RightPanel.transform.Find("PlayerTitle").gameObject; btnTabIcon = RightPanel.transform.Find("TabIcon").GetComponent