Ejemplo n.º 1
0
 private void Init()
 {
     if (GameUtil.isVIP())
     {
         VipTimeTxt.text = $"过期时间:{CommonUtil.splitStr_Start_str(PlayerInfoComponent.Instance.GetPlayerInfo().VipTime, ' ')}";
     }
     else
     {
         VipTimeTxt.text = "";
     }
     if (OtherData.getIsShiedBindPhone())
     {
         bindPhoneBtn.transform.localScale = Vector3.zero;
     }
     if (OtherData.getIsShiedRealName())
     {
         realNameBtn.transform.localScale = Vector3.zero;
     }
     bindPhoneBtn.gameObject.SetActive(string.IsNullOrEmpty(PlayerInfoComponent.Instance.GetPlayerInfo().Phone) && !OtherData.getIsShiedBindPhone());
     bindPhoneBtn.transform.parent.gameObject.SetActive(string.IsNullOrEmpty(PlayerInfoComponent.Instance.GetPlayerInfo().Phone) && !OtherData.getIsShiedBindPhone());
     changeNameBtn.gameObject.SetActive(PlayerInfoComponent.Instance.GetPlayerInfo().RestChangeNameCount > 0);
     changeNameBtn.transform.parent.gameObject.SetActive(PlayerInfoComponent.Instance.GetPlayerInfo().RestChangeNameCount > 0);
     realNameBtn.gameObject.SetActive(!PlayerInfoComponent.Instance.GetPlayerInfo().IsRealName&& !OtherData.getIsShiedRealName());
     realNameBtn.transform.parent.gameObject.SetActive(!PlayerInfoComponent.Instance.GetPlayerInfo().IsRealName&& !OtherData.getIsShiedRealName());
     realNameTxt.gameObject.SetActive(!OtherData.getIsShiedRealName());
     noBindPhoneTxt.gameObject.SetActive(!OtherData.getIsShiedBindPhone());
     GoldNumTxt.text   = PlayerInfoComponent.Instance.GetPlayerInfo().GoldNum.ToString();
     WingNumTxt.text   = PlayerInfoComponent.Instance.GetPlayerInfo().WingNum.ToString();
     HuafeiNumTxt.text = (PlayerInfoComponent.Instance.GetPlayerInfo().HuaFeiNum / 100.0f).ToString();
     if (GameUtil.isVIP())
     {
         PlayerFrame.transform.Find("HeadKuang").GetComponent <Image>().sprite = CommonUtil.getSpriteByBundle("image_main", "touxiangkuang_vip");
     }
 }
Ejemplo n.º 2
0
        private void CreatExpressions()
        {
            if (GameUtil.isCanUseEmoji())
            {
                ExceptionTxt.text = "表情包到期时间:" + CommonUtil.splitStr_Start_str(PlayerInfoComponent.Instance.GetPlayerInfo().EmogiTime, ' ');
            }
            else
            {
                ExceptionTxt.text = "";
            }

            ExpressionBtn.transform.GetChild(0).gameObject.SetActive(true);
            ShortBtn.transform.GetChild(0).gameObject.SetActive(false);
            GameObject obj = null;

            for (int i = 0; i < 18; ++i)
            {
                if (i < ExpressionItemList.Count)
                {
                    obj = ExpressionItemList[i];
                }
                else
                {
                    obj = GameObject.Instantiate(ExpressionItem);
                    obj.transform.SetParent(ExpressionGrid.transform);
                    obj.transform.localScale    = Vector3.one;
                    obj.transform.localPosition = Vector3.zero;
                    ExpressionItemList.Add(obj);
                    UI ui = ComponentFactory.Create <UI, GameObject>(obj);
                    ui.AddComponent <UIExpressionComponent>();
                    uiList.Add(ui);
                }
                uiList[i].GetComponent <UIExpressionComponent>().SetExpression(i + 1);
            }
        }
Ejemplo n.º 3
0
        public void Update()
        {
            HeadManager.setHeadSprite(playerIcon.GetComponent <Image>(), PlayerInfoComponent.Instance.GetPlayerInfo().Icon);
            nameTxt.text = PlayerInfoComponent.Instance.GetPlayerInfo().Name;

            if (PlayerInfoComponent.Instance.GetPlayerInfo().RestChangeNameCount <= 0)
            {
                changeNameBtn.gameObject.SetActive(false);
                changeNameBtn.transform.parent.gameObject.SetActive(false);
            }

            if (GameUtil.isVIP())
            {
                VipTimeTxt.text = $"过期时间:{CommonUtil.splitStr_Start_str(PlayerInfoComponent.Instance.GetPlayerInfo().VipTime, ' ')}";
            }
            else
            {
                VipTimeTxt.text = "";
            }

            changeNameBtn.gameObject.SetActive(PlayerInfoComponent.Instance.GetPlayerInfo().RestChangeNameCount > 0);
            changeNameBtn.transform.parent.gameObject.SetActive(PlayerInfoComponent.Instance.GetPlayerInfo().RestChangeNameCount > 0);
            realNameBtn.gameObject.SetActive(!PlayerInfoComponent.Instance.GetPlayerInfo().IsRealName&& !OtherData.getIsShiedRealName());
            realNameBtn.transform.parent.gameObject.SetActive(!PlayerInfoComponent.Instance.GetPlayerInfo().IsRealName&& !OtherData.getIsShiedRealName());
            realNameTxt.gameObject.SetActive(!OtherData.getIsShiedRealName());
            noBindPhoneTxt.gameObject.SetActive(!OtherData.getIsShiedBindPhone());

            if (PlayerInfoComponent.Instance.GetPlayerInfo().IsRealName)
            {
                realNameTxt.text = "已实名";
                realNameBtn.gameObject.SetActive(false);
                realNameBtn.transform.parent.gameObject.SetActive(false);
            }

            if (!string.IsNullOrEmpty(PlayerInfoComponent.Instance.GetPlayerInfo().Phone))
            {
                noBindPhoneTxt.text = "已绑定";
                bindPhoneBtn.gameObject.SetActive(false);
                bindPhoneBtn.transform.parent.gameObject.SetActive(false);
            }
            GoldNumTxt.text = PlayerInfoComponent.Instance.GetPlayerInfo().GoldNum.ToString();
        }