コード例 #1
0
    public void UpdateAttrInfo()
    {
        m_isNeedUpdate = true;
        if (BelleAttrInfoWindow.Instance() != null)
        {
            BelleAttrInfoWindow.Instance().SetBelleAttrData();
        }
        SetCombatValue();
        //碎片信息
        UpdateEvalutionInfo();

        //品阶信息
        updateBelleColor();

        if (BelleInfoWindow.Instance() != null)
        {
            BelleInfoWindow.Instance().UpdateScrollViewList();
        }
    }
コード例 #2
0
    public void UpdateCloseState()
    {
        m_curTimer = 1;
        //小红点更新
        objBelleCloseTip.gameObject.SetActive(BelleData.IsCanCloseFree());
        UpdateTickBand();
        UpdateCloseTimeLabel();
        UpdateCloseProcessBar();
        BelleAttrInfoWindow belleAttrInfoWindow = m_belleAttrWin.GetComponent <BelleAttrInfoWindow>();

        if (belleAttrInfoWindow != null)
        {
            belleAttrInfoWindow.SetBelleAttrData();
        }

        //单个条目红点的更新
        if (BelleInfoWindow.Instance() != null)
        {
            BelleInfoWindow.Instance().UpdateCloseRedTipState();
        }
    }
コード例 #3
0
 void Awake()
 {
     m_instacnce = this;
     //  SetBelleAttrData();
 }
コード例 #4
0
    public void SetData()
    {
        InitTab();
        if (BelleInfoWindow.Instance() != null)
        {
            Tab_Belle belleTab = BelleInfoWindow.Instance().CurSellectedBelleData;

            if (null == belleTab)
            {
                //LogModule.ErrorLog("BelleInfoWindow.Instance().CurSellectedBelleData is null!");
                return;
            }

            Belle curBelleData = null;
            if (BelleData.OwnedBelleMap.ContainsKey(belleTab.Id))
            {
                curBelleData = BelleData.OwnedBelleMap[belleTab.Id];
            }

            if (null == curBelleData)
            {
                return;
            }
            //名字
            m_belleName.text  = belleTab.Name;
            m_belleName.color = BelleData.GetBelleColorByColorLevel(curBelleData.colorLevel);
            //战力
            curBelleData.UpdateAttrMap();
            m_battleValue.text = BelleData.GetPowerNum(curBelleData.attrMap).ToString();

            //品阶
            m_curBelleMainColor.text          = BelleData.GetBelleDescByColorLevel(curBelleData.colorLevel);
            m_curBelleMainColorPic.spriteName = BelleData.GetBelleColorPicByColorLevel(curBelleData.colorLevel);
            m_curBelleSubColor.text           = StrDictionary.GetClientDictionaryString("#{10811}", curBelleData.subLevel);
            m_curBelleMainColor.color         = BelleData.GetBelleColorByColorLevel(curBelleData.colorLevel);
            m_curBelleSubColor.color          = BelleData.GetBelleColorByColorLevel(curBelleData.colorLevel);

            //碎片信息
            UpdateEvalutionInfo();
            //半身像
            UnityEngine.Object belleTextureObj = ResourceManager.LoadResource(BelleData.GetBelleBigTextureName(belleTab), typeof(Texture)) as Texture;
            if (null != belleTextureObj)
            {
                m_bellePic.mainTexture = belleTextureObj as Texture;
            }

            //属性界面
            BelleAttrInfoWindow belleAttrInfoWindow = m_belleAttrWin.GetComponent <BelleAttrInfoWindow>();
            if (belleAttrInfoWindow != null)
            {
                belleAttrInfoWindow.SetBelleAttrData();
            }
            UpdateCloseState();

            SetCombatValue();

            //最大等级的一个判断
            m_EvaluBtnObj.SetActive(!curBelleData.IsMaxLevel());
            m_EvaluMaxLabel.gameObject.SetActive(curBelleData.IsMaxLevel());

            m_belleDescText.text = belleTab.Introduction;
            int count = ForeordinationHead.Length;
            for (int i = 0; i < count; ++i)
            {
                if (ForeordinationHead[i] != null)
                {
                    if (i < belleTab.getAffectionConditonValueCount())
                    {
                        int id = belleTab.GetAffectionConditonValuebyIndex(i);
                        ForeordinationHead[i].SetActive(true);
                        bool      isHas          = BelleData.OwnedBelleMap.ContainsKey(id);
                        Tab_Belle affectionbelle = TableManager.GetBelleByID(id, 0);
                        if (affectionbelle != null)
                        {
                            Tab_CommonItem cItem = TableManager.GetCommonItemByID(affectionbelle.BelleItemID, 0);
                            if (cItem != null)
                            {
                                UISprite us = ForeordinationHead[i].GetComponent <UISprite>();
                                if (us != null)
                                {
                                    us.spriteName = Games.GlobeDefine.GlobeVar.QualityColorGrid[cItem.Quality - 1];
                                    if (isHas)
                                    {
                                        us.color = Games.GlobeDefine.GlobeVar.BUTTONCOLER;
                                    }
                                    else
                                    {
                                        us.color = Games.GlobeDefine.GlobeVar.BUTTONGRAY;
                                    }
                                }
                                Transform tf = ForeordinationHead[i].transform.Find("Head");
                                if (tf != null)
                                {
                                    UISprite usc = tf.GetComponent <UISprite>();
                                    if (usc != null)
                                    {
                                        usc.spriteName = cItem.Icon;
                                        if (isHas)
                                        {
                                            usc.color = Games.GlobeDefine.GlobeVar.BUTTONCOLER;
                                        }
                                        else
                                        {
                                            usc.color = Games.GlobeDefine.GlobeVar.BUTTONGRAY;
                                        }
                                    }
                                }
                            }
                        }
                    }
                    else
                    {
                        ForeordinationHead[i].SetActive(false);
                    }
                }
            }
            if (HeadTone != null)
            {
                Tab_CommonItem cItem = TableManager.GetCommonItemByID(belleTab.BelleItemID, 0);
                if (cItem != null)
                {
                    UISprite us = HeadTone.GetComponent <UISprite>();
                    if (us != null)
                    {
                        us.spriteName = Games.GlobeDefine.GlobeVar.QualityColorGrid[belleTab.Quality - 1];
                    }
                    Transform tf = HeadTone.transform.Find("Head");
                    if (tf != null)
                    {
                        UISprite us1 = tf.GetComponent <UISprite>();
                        if (us1 != null)
                        {
                            us1.spriteName = cItem.Icon;
                        }
                    }
                    tf = HeadTone.transform.Find("tone");
                    if (tf != null)
                    {
                        UISprite us2 = tf.GetComponent <UISprite>();
                        if (us2 != null)
                        {
                            us2.spriteName = BelleData.GetBelleColorPicByColorLevel(BelleData.OwnedBelleMap[belleTab.Id].colorLevel);
                        }
                    }
                }
            }
        }
    }