Example #1
0
 public void ShowFashionPanel()
 {
     if (m_FashionPanel == null)
     {
         m_FashionPanel = NewPanelPos.InstantiateNGUIObj(FashionPanelPrefab).GetComponent <FashionPanel_V3>();
     }
     m_FashionPanel.Show();
 }
Example #2
0
 public void InitPanel(List <ItemData> fashionList, FashionPanel_V3 MyParent)
 {
     this.MyParent = MyParent;
     this.CurrentFashionDataList = fashionList;
     Grid.ClearChild();
     MyFashionButtonList = new List <SingleFashionBtn>();
     for (int i = 0; i < fashionList.Count; i++)
     {
         SingleFashionBtn newBtn = Grid.InstantiateNGUIObj(SingleFashionBtnPrefab).GetComponent <SingleFashionBtn>();
         newBtn.transform.localPosition = new Vector3(0, 150 - 100 * i, 0);
         newBtn.Show(fashionList[i], this);
         MyFashionButtonList.Add(newBtn);
     }
 }
Example #3
0
        public void ShowFashionInfo(ItemData fashionData, FashionPanel_V3 myParent)
        {
            this.MyParent        = myParent;
            CurrentFashionData   = fashionData;
            CurrentUnlockData    = myParent.GetUnlockData(fashionData);
            CurrentFashionIsLock = fashionData != myParent.GetAllFashionDatas()[0] && CurrentUnlockData == null;
            int equiptFashionID = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PlayerCommonValue.PLAYER_FIELD_VISIBLE_FASHION;

            IsEquipFashion         = fashionData._goodID == equiptFashionID || (equiptFashionID == 0 && fashionData == myParent.GetAllFashionDatas()[0]);
            CurrentFashionShopData = ShopDataManager.Instance.shopConfigDataBase._dataTable.FirstOrDefault(P => P.GoodsID == fashionData._goodID);
            CreatPayIConPoint.ClearChild();
            DesLabel.SetText(LanguageTextManager.GetString(fashionData._szDesc));
            if (!CurrentFashionIsLock)
            {
                if (!IsEquipFashion)//未穿上的装备
                {
                    //EquipBtn.SetButtonText(LanguageTextManager.GetString("IDS_H2_69"));//穿上
                    EquipBtn.spriteSwithList.ApplyAllItem(C => C.ChangeSprite(1));
                    //SetBtnActive(EquipBtn,true);
                }
                else
                {
                    //EquipBtn.SetButtonText(LanguageTextManager.GetString("IDS_H2_69"));//卸下
                    EquipBtn.spriteSwithList.ApplyAllItem(C => C.ChangeSprite(2));
                    //SetBtnActive(EquipBtn,false);
                }
//                InfoTitle.ChangeSprite(1);//小提示
//                EquipBtn.spriteSwith.transform.localPosition = Vector3.zero;
//                if (GetLeftTime() > -1)//显示倒计时提示
//                {
//                    CancelInvoke();
//                    InvokeRepeating("ShowItemLeftTime", 0, 1);
//                }
//                else//显示永久时装提示
//                {
//                    InfoMainLabel.SetText(LanguageTextManager.GetString("IDS_H1_365"));
//                }
            }
            else//未购买
            {
//				InfoTitle.ChangeSprite(2);//购买条件
                SetBtnActive(EquipBtn, true);
                EquipBtn.spriteSwithList.ApplyAllItem(C => C.ChangeSprite(3));              //充值按钮
//                string AllowLevelStr = string.Format(LanguageTextManager.GetString("IDS_H1_361"), fashionData._AllowLevel);
//                string BuyFashionLevelStr = CurrentFashionShopData.BuyLvl > 0 ? string.Format(LanguageTextManager.GetString("IDS_H1_362"), CurrentFashionShopData.BuyLvl) : "";
//                InfoMainLabel.SetText(string.Format("{0}  {1}", AllowLevelStr, BuyFashionLevelStr));
//                SetCostLabel();
            }
        }
Example #4
0
        public void Show(ItemData selectFashionData, FashionPanel_V3 fashionPanel)
        {
            //CreatTitleIconPoint.ClearChild();
            //CreatObjectToNGUI.InstantiateObj(selectFashionData._picPrefab, CreatTitleIconPoint);
            //TitleSpriteSwith.ChangeSprite(seleteFashionBtn.DataToSpriteID(seleteFashionBtn.MyFashionData));
            SingleAtbPanelList.ApplyAllItem(P => P.Close());
            this.MyParent = fashionPanel;
            NamePos.ClearChild();
            NamePos.InstantiateNGUIObj(selectFashionData.DisplayBig_prefab);
            this.LevelLabel.SetText(selectFashionData._Level);
            EquipmentData itemdata = selectFashionData as EquipmentData;

            string[] neweffects     = itemdata._vectEffects.Split('|');
            string[] currentEffects = MyParent.CurrentMaxFashionData == null ? null : MyParent.CurrentMaxFashionData._vectEffects.Split('|');
            int      forceNum       = 0;

            for (int i = 0; i < neweffects.Length; i++)
            {
                bool   IsUp          = false;
                string currentEffect = currentEffects == null ? string.Empty : currentEffects.FirstOrDefault(P => P.Split('+')[0] == neweffects[i].Split('+')[0]);
                IsUp = string.IsNullOrEmpty(currentEffect);
                string[]   newEffectsStr = neweffects[i].Split('+');
                EffectData effectdata    = ItemDataManager.Instance.EffectDatas._effects.First(P => P.m_SzName == newEffectsStr[0]);
                string     newEffectName = LanguageTextManager.GetString(effectdata.IDS);
                int        newAddNumber  = HeroAttributeScale.GetScaleAttribute(newEffectName, int.Parse(newEffectsStr[1]));
                //string[] currentEffectsStr = currentEffects.FirstOrDefault(P=>P);

                int currentNumber = 0;
                if (!IsUp)
                {
                    string[] curef             = currentEffect.Split('+');
                    var      currentEffectData = ItemDataManager.Instance.EffectDatas._effects.First(P => P.m_SzName == curef[0]);
                    currentNumber = HeroAttributeScale.GetScaleAttribute(currentEffectData, int.Parse(curef[1]));
                    //if (newAddNumber > currentNumber)
                    //{
                    //    IsUp = true;
                    //}
                    //else
                    //{
                    //    newAddNumber = currentNumber;
                    //}
                }
                SingleAtbPanelList[i].Show(effectdata, currentNumber, newAddNumber);
                forceNum += newAddNumber;
            }
            int newAtk = HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, forceNum);

            ForceLabel.SetText(newAtk);
        }