Пример #1
0
        public VIPBaseInfo GetVIPBaseInfo()
        {
            VIPBaseInfo info = new VIPBaseInfo();

            info.Level         = vipData.Level;
            info.NextLevelText = (vipData.Level + 1).ToString();
            info.CurrentExp    = vipData.CurrentExp;
            info.FullExp       = vipData.NeedExp;
            info.NecessaryExp  = vipData.NeedExp - vipData.CurrentExp;
            return(info);
        }
Пример #2
0
        public void SetVIPPanel()
        {
            DataLookupsCache.Instance.SearchDataByID <bool>("isOpenEC", out bool isOpen);

            LTVIPDataManager.Instance.UpdateVIPBaseData();
            VIPBaseInfo info = LTVIPDataManager.Instance.GetVIPBaseInfo();

            vipPanel.gameObject.CustomSetActive(isOpen);
            levelLabel.text      = info.Level.ToString();
            vipProgressBar.value = info.CurrentExp / (float)info.FullExp;

            if (info.Level == LTVIPDataManager.Instance.GetLevelCount())
            {
                vipProgressBarLabel.text = EB.StringUtil.Concat(info.CurrentExp.ToString(), "/MAX");
            }
            else
            {
                vipProgressBarLabel.text = EB.StringUtil.Concat(info.CurrentExp.ToString(), "/", info.FullExp);
            }
        }
Пример #3
0
        private void OnRefreshTopVIPBaseInfo()
        {
            VIPBaseInfo info = LTVIPDataManager.Instance.GetVIPBaseInfo();

            controller.UiLabels["Level"].text = info.Level.ToString();

            if (info.Level == LTVIPDataManager.Instance.GetLevelCount())
            {
                controller.UiLabels["Experience"].text   = string.Concat(info.CurrentExp.ToString(), "/MAX");
                controller.UiLabels["NecessaryExp"].text = EB.Localizer.GetString("ID_HAS_MAX_LEVEL");
                controller.UiLabels["ExpFetch"].text     = string.Empty;
            }
            else
            {
                controller.UiLabels["Experience"].text   = string.Concat(info.CurrentExp.ToString(), "/", info.FullExp);
                controller.UiLabels["NecessaryExp"].text = string.Concat("[FFF54B]", info.NecessaryExp.ToString(), string.Format("[-] {0} [FFF54B]VIP{1}", EB.Localizer.GetString("ID_VIP_REWARD_TIP1"), info.NextLevelText));
                controller.UiLabels["NecessaryExp"].transform.GetChild(0).GetComponent <UILabel>().text = string.Concat(info.NecessaryExp.ToString(), string.Format(" {0} VIP{1}", EB.Localizer.GetString("ID_VIP_REWARD_TIP1"), info.NextLevelText));
                controller.UiLabels["ExpFetch"].text = EB.Localizer.GetString("ID_REGAIN");
            }

            controller.UiProgressBars["ExpertProgressBar"].value = info.CurrentExp / (float)info.FullExp;
        }
Пример #4
0
        private void Refresh()
        {
            VIPBaseInfo info = LTVIPDataManager.Instance.GetVIPBaseInfo();

            Level.text = info.Level.ToString();
        }