Esempio n. 1
0
        private IEnumerator ShowUIIE()
        {
            // 等待0.1s是为了防止闪屏,在长界面切到短界面或短界面切到长界面的时候,高度值虽然改变了,但是锚点的对其需要下一帧才会刷新
            yield return(null);

            m_ThisPanel.alpha = 1;

            HotfixCreateFX.ShowItemQualityFX(mQualityFX, mEffectClip, m_Icon.transform, m_QualityLevel);
        }
Esempio n. 2
0
        public override void OnEnable()
        {
            //base.OnEnable();

            if (mLTItemData != null && Frame != null)
            {
                LTIconNameQuality itemInfo = LTItemInfoTool.GetInfo(mLTItemData.id, mLTItemData.type, mLTItemData.coloring);
                HotfixCreateFX.ShowItemQualityFX(m_QualityFX, m_EffectClip, Frame.transform, int.Parse(itemInfo.quality));
                var t_particle = Frame.transform.GetComponentInChildren <ParticleSystemUIComponent>();
                if (t_particle != null)
                {
                    t_particle.transform.localScale = Vector3.one * (Frame.width / 186f);
                }
            }
        }
Esempio n. 3
0
 public void SetCellData(LTPartnerInfoController ctrl, int Eid, int equipmentType, int equipmentLevel)
 {
     //Debug.LogError("Eid cell is : " + Eid);
     if (Eid == -1)
     {
         this.eid = Eid;
         item.SetActive(false);
     }
     else
     {
         item.SetActive(true);
         this.ctrl          = ctrl;
         this.eid           = Eid;
         this.equipmentType = equipmentType;
         item.SetActive(Eid != 0);
         tpl = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetEquipment(Eid);
         this.equipmentLevel = equipmentLevel;
         SetFrame(tpl.QualityLevel);
         SetIcon(tpl.IconId);
         SetSuit(tpl.QualityLevel, tpl.SuitIcon, equipmentLevel);
         HotfixCreateFX.ShowItemQualityFX(mQualityFX, mEffectClip, mDMono.transform, tpl.QualityLevel);
     }
 }
Esempio n. 4
0
 public void ShowItemFX(int qualityLevel)
 {
     HotfixCreateFX.ShowItemQualityFX(mQualityFX, mEffectClip, Icon.transform.parent, qualityLevel);
 }
Esempio n. 5
0
        private void UpdateUI()
        {
            if (null != ItemData)
            {
                mDMono.gameObject.GetComponent <BoxCollider>().enabled = true;
                string templateid    = EB.Dot.String(m_EconomyIDPropertyName, ItemData, "");
                int    num           = EB.Dot.Integer(m_NumPropertyName, ItemData, 0);
                int    quality_level = EB.Dot.Integer(m_QualityLevelPropertyName, ItemData, 0);

                m_Icon.spriteName        = Hotfix_LT.Data.EconemyTemplateManager.GetItemIcon(templateid);
                m_Type                   = EB.Dot.String(m_TypeName, ItemData, "");
                m_LevelBorder.spriteName = UIItemLvlDataLookup.LvlToStr(quality_level + "");
                if (quality_level == 7)
                {
                    m_FrameBG.spriteName = "Ty_Quality_Xuancai_Di";
                }
                else
                {
                    m_FrameBG.spriteName = "Ty_Di_2";
                }
                m_FrameBG.color = UIItemLvlDataLookup.GetItemFrameBGColor(quality_level + "");
                m_LevelBorder.gameObject.CustomSetActive(true);

                HotfixCreateFX.ShowItemQualityFX(mQualityFX, mEffectClip, mDMono.transform, quality_level);

                m_Flag.CustomSetActive(m_Type == "HeroShard");
                m_EquipSuitIcon.gameObject.CustomSetActive(m_Type == "Equipment");
                m_EquipLevel.gameObject.CustomSetActive(m_Type == "Equipment");

                if (m_Type == "Equipment")
                {
                    int equipLevel = EB.Dot.Integer(m_EquipLevelStr, ItemData, 1);
                    if (equipLevel <= 0)
                    {
                        m_EquipLevel.gameObject.CustomSetActive(false);
                    }
                    else
                    {
                        m_EquipLevel.gameObject.CustomSetActive(true);
                        m_EquipLevel.text         = m_EuqipLevelShadow.text = "+" + equipLevel;
                        m_EquipLevelBG.spriteName = UIItemLvlDataLookup.GetEquipLevelBGStr(quality_level);
                    }
                    m_EquipSuitIcon.spriteName = Hotfix_LT.Data.EconemyTemplateManager.GetEquipSuitIcon(templateid);
                }

                int grade = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetGoodsGradeNum(templateid);
                m_boxGradeNumLab.gameObject.CustomSetActive(grade != 0);
                if (grade != 0)
                {
                    m_boxGradeNumLab.text = string.Format("+{0}", grade);
                }

                string suitIcon = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetEquipSuit(templateid);
                if (!string.IsNullOrEmpty(suitIcon))
                {
                    m_EquipSuitIcon.gameObject.CustomSetActive(true);
                    m_EquipSuitIcon.spriteName = suitIcon;
                }

                if (m_Count != null)
                {
                    if (num > 1)
                    {
                        m_Count.text = num + "";
                        m_Count.gameObject.CustomSetActive(true);
                    }
                    else
                    {
                        m_Count.gameObject.CustomSetActive(false);
                    }
                }
                string InventoryId = EB.Dot.String("inventory_id", ItemData, "");
                if (LTInventoryAllController._CurrentSelectCellId != null && LTInventoryAllController._CurrentSelectCellId.Contains(InventoryId))
                {
                    LTInventoryAllController._CurrentSelectCell = mDMono.transform.GetMonoILRComponentByClassPath <UIInventoryBagCellController>("Hotfix_LT.UI.UIInventoryBagCellController");
                    Border.CustomSetActive(true);
                }
                else
                {
                    Border.CustomSetActive(false);
                }

                //红点判断
                string eid = EB.Dot.String("economy_id", ItemData, null);
                if (eid != null)
                {
                    var GeneralItem = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetGeneral(eid);
                    RedPoint.CustomSetActive(GeneralItem != null && GeneralItem.CanUse && !LTMainHudManager.Instance.ItemsList.Contains(InventoryId));
                }
            }
            else
            {
                m_Icon.spriteName = "";
                m_LevelBorder.gameObject.CustomSetActive(false);
                m_Flag.CustomSetActive(false);
                m_EquipSuitIcon.gameObject.CustomSetActive(false);
                m_EquipLevel.gameObject.CustomSetActive(false);
                m_boxGradeNumLab.gameObject.CustomSetActive(false);
                mDMono.gameObject.GetComponent <BoxCollider>().enabled = false;
                if (m_Count != null)
                {
                    m_Count.gameObject.CustomSetActive(false);
                }
                RedPoint.CustomSetActive(false);
                Border.CustomSetActive(false);
                if (mQualityFX != null)
                {
                    mQualityFX.gameObject.CustomSetActive(false);
                }
                else
                {
                    if (mDMono.transform.Find("QualityFX") != null)
                    {
                        mQualityFX  = mDMono.transform.Find("QualityFX").GetComponent <ParticleSystemUIComponent>();
                        mEffectClip = mDMono.transform.Find("QualityFX").GetComponent <EffectClip>();
                        mQualityFX.gameObject.CustomSetActive(false);
                    }
                }
            }
        }
Esempio n. 6
0
 public override void OnFocus()
 {
     base.OnFocus();
     HotfixCreateFX.ShowItemQualityFX(mQualityFX, mEffectClip, mIcon.transform, qualityLevel);
 }