예제 #1
0
        public void Init(int itemID, int number)
        {
            ItemData getItem = ItemDataManager.Instance.GetItemData(itemID);

            CreatObjectToNGUI.InstantiateObj(getItem._picPrefab, CreatIconPoint);
            TextColor labelColor = TextColor.white;

            switch (getItem._ColorLevel)
            {
            case 0:
                labelColor = TextColor.EquipmentGreen;
                break;

            case 1:
                labelColor = TextColor.EquipmentBlue;
                break;

            case 2:
                labelColor = TextColor.EquipmentMagenta;
                break;

            case 3:
                labelColor = TextColor.EquipmentYellow;
                break;
            }
            NameLabel.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(getItem._szGoodsName), labelColor));
            NumberLabel.SetText(NGUIColor.SetTxtColor(string.Format("+{0}", number), labelColor));
        }
예제 #2
0
    public void SetInfo(int itemID, uint itemNum, Vector3 pos, float delayTime)
    {
        var itemData = ItemDataManager.Instance.GetItemData(itemID);

        Label_Reward.text = NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemData._szGoodsName)
                                                  + "x" + itemNum.ToString(), (UI.TextColor)itemData._ColorLevel);
        if (itemData.smallDisplay.Contains("_Lv"))
        {
            int    index = itemData.smallDisplay.LastIndexOf("_Lv");
            string str   = itemData.smallDisplay.Substring(0, index);
            Debug.Log("itemData.smallDisplay : " + str);
            UI_RewardIcon.spriteName = str;
        }
        else
        {
            UI_RewardIcon.spriteName = itemData.smallDisplay;
        }

        UI_RewardIcon.alpha       = 0;
        Label_Reward.alpha        = 0;
        UI_RewardBackground.alpha = 0;
        m_ShowPos = pos;
        m_HidePos = pos + Vector3.right * 500;

        StartCoroutine("ShowDelay", delayTime);
    }
예제 #3
0
    public void Init(ItemFielInfo itemfileInfo)
    {
        IconItem.Init(itemfileInfo);
        Lable_name.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemfileInfo.LocalItemData._szGoodsName), (TextColor)itemfileInfo.LocalItemData._ColorLevel));
        Lable_position.SetText(EquipmentUpgradeDataManger.Instance.PositionDic[itemfileInfo.LocalItemData._GoodsSubClass]);
        Lable_Currentforce.SetText((int)EquipItem.GetEquipForce(itemfileInfo));
        int addforce = ((int)EquipItem.GetNextLevelEquipForce(itemfileInfo, UpgradeType.StarUp) - (int)EquipItem.GetEquipForce(itemfileInfo));

        if (addforce > 0)
        {
            Lable_addForce.gameObject.SetActive(true);
            Lable_addForce.SetText("+" + addforce);
        }
        else
        {
            Lable_addForce.gameObject.SetActive(false);
        }
        //Lable_strengthLevle.SetText(EquipmentUpgradeDataManger.Instance.GetStrengthLevel(itemfileInfo));
        int starLevel = PlayerDataManager.Instance.GetEquipmentStarLevel((EquiptSlotType)itemfileInfo.sSyncContainerGoods_SC.nPlace);

        if (starLevel < CommonDefineManager.Instance.CommonDefine.StartStrengthLimit)
        {
            Eff_go.SetActive(true);
        }
        else
        {
            Eff_go.SetActive(false);
        }
        SetStarColor(starLevel);
    }
예제 #4
0
        protected string GetGoodsName(ItemData GoodsData)
        {
            TextColor NameTextColor = TextColor.white;

            switch (GoodsData._ColorLevel)//物品品质颜色
            {
            case 0:
                NameTextColor = TextColor.EquipmentGreen;
                break;

            case 1:
                NameTextColor = TextColor.EquipmentBlue;
                break;

            case 2:
                NameTextColor = TextColor.EquipmentMagenta;
                break;

            case 3:
                NameTextColor = TextColor.EquipmentYellow;
                break;

            default:
                break;
            }
            string str = NGUIColor.SetTxtColor(LanguageTextManager.GetString(GoodsData._szGoodsName), NameTextColor);

            return(str);
        }
예제 #5
0
        string GetItemName(ItemData itemFileInfo)
        {
            string    getStr     = "";
            TextColor labelColor = TextColor.white;

            switch (itemFileInfo._ColorLevel)
            {
            case 0:
                labelColor = TextColor.EquipmentGreen;
                break;

            case 1:
                labelColor = TextColor.EquipmentBlue;
                break;

            case 2:
                labelColor = TextColor.EquipmentMagenta;
                break;

            case 3:
                labelColor = TextColor.EquipmentYellow;
                break;
            }
            getStr = NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemFileInfo._szGoodsName), labelColor);
            return(getStr);
        }
예제 #6
0
    public string ParseColorChat(Chat.WindowType type, SMsgChat_SC sChat)
    {
        string str = "";

        switch (type)
        {
        case Chat.WindowType.Team:
        case Chat.WindowType.Town:
        case Chat.WindowType.Private:
        case Chat.WindowType.World:
        {
            if (sChat.senderActorID != mMyActorID)
            {
                str = NGUIColor.SetTxtColor(sChat.SenderName + " : ", TextColor.ChatBlue)
                      + NGUIColor.SetTxtColor(sChat.Chat, TextColor.white);
            }
            else
            {
                str = NGUIColor.SetTxtColor(sChat.SenderName + " : ", TextColor.ChatGreen)
                      + NGUIColor.SetTxtColor(sChat.Chat, TextColor.ChatYellow);
            }
        }
        break;

        case Chat.WindowType.System:
            str = NGUIColor.SetTxtColor(":" + sChat.Chat, TextColor.ChatOrange);
            break;
        }

        return(str);
    }
예제 #7
0
    public void Init(UpgradeRequire upgradeRequire)
    {
        ItemFielInfo itemfileinfo = new ItemFielInfo(upgradeRequire.GoodsId);

        iconItem.Init(itemfileinfo);
        Lable_name.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemfileinfo.LocalItemData._szGoodsName), (TextColor)itemfileinfo.LocalItemData._ColorLevel));
        if (upgradeRequire.GoodsId == 3050001)
        {
            if (upgradeRequire.Count <= ContainerInfomanager.Instance.GetOwnMaterialCount(upgradeRequire))
            {
                Lable_count.SetText(NGUIColor.SetTxtColor(upgradeRequire.Count, TextColor.green));
            }
            else
            {
                Lable_count.SetText(NGUIColor.SetTxtColor(upgradeRequire.Count, TextColor.red));
            }
        }
        else
        {
            if (upgradeRequire.Count <= ContainerInfomanager.Instance.GetOwnMaterialCount(upgradeRequire))
            {
                Lable_count.SetText(NGUIColor.SetTxtColor(ContainerInfomanager.Instance.GetOwnMaterialCount(upgradeRequire) + "/" + upgradeRequire.Count, TextColor.green));
            }
            else
            {
                Lable_count.SetText(NGUIColor.SetTxtColor(ContainerInfomanager.Instance.GetOwnMaterialCount(upgradeRequire) + "/" + upgradeRequire.Count, TextColor.red));
            }
        }
    }
예제 #8
0
        void SetTreasureItemNameLabel(ItemData itemData, int number)
        {
            TextColor NameTextColor = TextColor.white;

            switch (itemData._ColorLevel)//物品品质颜色
            {
            case 0:
                NameTextColor = TextColor.EquipmentGreen;
                break;

            case 1:
                NameTextColor = TextColor.EquipmentBlue;
                break;

            case 2:
                NameTextColor = TextColor.EquipmentMagenta;
                break;

            case 3:
                NameTextColor = TextColor.EquipmentYellow;
                break;

            default:
                break;
            }
            string ItemName = LanguageTextManager.GetString(itemData._szGoodsName);
            string format   = LanguageTextManager.GetString("IDS_I21_10");

            TreasureChestsItemNameLabel.SetText(NGUIColor.SetTxtColor(string.Format(format, ItemName, number), NameTextColor));
        }
예제 #9
0
        string GetItemLevel(ItemData itemFileInfo)
        {
            bool   canEquipt = itemFileInfo._AllowLevel <= PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_LEVEL;
            string str       = NGUIColor.SetTxtColor(itemFileInfo._AllowLevel.ToString(), canEquipt?TextColor.white:TextColor.red);

            return(str);
        }
예제 #10
0
        /// <summary>
        /// 显示经脉介绍文字
        /// </summary>
        public void ShowMeridiansDesInfo(int MeridiansID, bool IsUnlock, string needAddNumber)
        {
            if (MeridiansID == 0)
            {
                MeridiansDesLabel.gameObject.SetActive(false);
                return;
            }
            MeridiansDesLabel.gameObject.SetActive(true);
            PlayerMeridiansData playerMeridiansData = PlayerMeridiansDataManager.GetMeridiansData(MeridiansID);
            string meridiansName = LanguageTextManager.GetString(playerMeridiansData.KongfuName);

            string[]   addEffect  = playerMeridiansData.EffectAdd.Split('+');
            EffectData effectData = ItemDataManager.Instance.EffectDatas._effects.First(P => P.m_SzName == addEffect[0]);
            string     addEffName = LanguageTextManager.GetString(effectData.IDS);
            string     addEffNum  = NGUIColor.SetTxtColor(HeroAttributeScale.GetScaleAttribute(effectData, int.Parse(addEffect[1])), TextColor.white);

            if (!IsUnlock)
            {
                needAddNumber = needAddNumber == "0" ? playerMeridiansData.LevelUpNeed.ToString() : needAddNumber;
                needAddNumber = NGUIColor.SetTxtColor(needAddNumber, TextColor.white);
                MeridiansDesLabel.Show(meridiansName, addEffName, addEffNum, needAddNumber);
            }
            else
            {
                MeridiansDesLabel.Show(meridiansName, addEffName, addEffNum);
            }
        }
예제 #11
0
        string GetFruitName(FruitData fruitData)
        {
            TextColor textColor = TextColor.white;

            switch (fruitData.FruitLevel)
            {
            case 0:
                textColor = TextColor.EquipmentGreen;
                break;

            case 1:
                textColor = TextColor.EquipmentBlue;
                break;

            case 2:
                textColor = TextColor.EquipmentMagenta;
                break;

            case 3:
                textColor = TextColor.EquipmentYellow;
                break;

            default:
                break;
            }
            string name = NGUIColor.SetTxtColor(LanguageTextManager.GetString(fruitData.FruitName), textColor);

            return(name);
        }
예제 #12
0
 public void RefreshItem()
 {
     equipItem.Init(m_itemFileInfo);
     Lable_Name.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(m_itemFileInfo.LocalItemData._szGoodsName), (TextColor)m_itemFileInfo.LocalItemData._ColorLevel));
     Lable_position.SetText(NGUIColor.SetTxtColor(EquipmentUpgradeDataManger.Instance.PositionDic[m_itemFileInfo.LocalItemData._GoodsSubClass], TextColor.green));
     Lable_Force.SetText((int)EquipItem.GetEquipForce(m_itemFileInfo));
     Icon_CanUp.SetActive(ContainerInfomanager.Instance.EquipmentCanUp(EquipmentUpgradeDataManger.Instance.CurrentType, m_itemFileInfo));
     SetItemLevel(EquipmentUpgradeDataManger.Instance.CurrentType, m_itemFileInfo);
 }
예제 #13
0
    public void Init(ItemFielInfo itemfileInfo)
    {
        ItemFielInfo NextItem = new ItemFielInfo((itemfileInfo.LocalItemData as EquipmentData).UpgradeID);

        IconItem_current.Init(itemfileInfo);
        Lable_CurrentName.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemfileInfo.LocalItemData._szGoodsName), (TextColor)itemfileInfo.LocalItemData._ColorLevel));
        IconItem_nextLv.Init(NextItem);
        Lable_NextLvName.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(NextItem.LocalItemData._szGoodsName), (TextColor)NextItem.LocalItemData._ColorLevel));
    }
예제 #14
0
 void UpdateUI_NoneLink()
 {
     Lable_Tips.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString("IDS_I1_43"), TextColor.green));
     Sps_Background.ChangeSprite(1);
     icon_View.SetActive(false);
     icon_lock.SetActive(false);
     Point_icon.ClearChild();
     CreatObjectToNGUI.InstantiateObj(CurrentItem.LinkIcon[0], Point_icon);
 }
예제 #15
0
        public void Show(ItemFielInfo itemFielInfo, EquipmentUpgradePanel myParent)
        {
            m_EquipmentEntity = itemFielInfo.equipmentEntity;
            MyParent          = myParent;
            m_UpgradItemMainProperty.Init(itemFielInfo);
            if (itemFielInfo == null)
            {
                ClearUpPanel();
                return;
            }
            var normalItem = itemFielInfo.LocalItemData as EquipmentData;
            var targetItem = ItemDataManager.Instance.GetItemData(((itemFielInfo.LocalItemData) as EquipmentData).UpgradeID) as EquipmentData;

            ShowMainEffectLabel(normalItem, targetItem);
            EquipmentData itemData    = itemFielInfo.LocalItemData as EquipmentData;
            string        needItemStr = "";

            if (itemData.UpgradeCost != "")
            {
                string[] costItemStr = itemData.UpgradeCost.Split('|');
                foreach (var child in costItemStr)
                {
                    string[] chacheStr = child.Split('+');
                    needItemStr += string.Format("{0}x{1}\n", LanguageTextManager.GetString(ItemDataManager.Instance.GetItemData(int.Parse(chacheStr[0]))._szGoodsName), chacheStr[1]);

                    if (ContainerInfomanager.Instance.GetOwnMaterialCount(int.Parse(chacheStr[0])) < int.Parse(chacheStr[1]))
                    {
                        needItemStr = NGUIColor.SetTxtColor(needItemStr, TextColor.red);
                    }
                    else
                    {
                        needItemStr = NGUIColor.SetTxtColor(needItemStr, TextColor.white);
                    }
                }
            }
            if (itemData.UpgradeID != 0)
            {
                int targetLevel = ItemDataManager.Instance.GetItemData(itemData.UpgradeID)._AllowLevel;

                string Levelstr = string.Format("{0}{1}", targetLevel, LanguageTextManager.GetString("IDS_H1_156"));

                if (PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_LEVEL < targetLevel)
                {
                    Levelstr = NGUIColor.SetTxtColor(Levelstr, TextColor.red);
                }
                else
                {
                    Levelstr = NGUIColor.SetTxtColor(Levelstr, TextColor.white);
                }
                LevelNeedLabel.SetText(Levelstr);
            }
            NeedItemDesLabel.SetText(needItemStr);
            HelpTipsLabel.SetText(LanguageTextManager.GetString("IDS_I10_4"));
            PriceLabel.SetText(normalItem._SaleCost + itemFielInfo.equipmentEntity.ITEM_FIELD_VISIBLE_COMM);
        }
예제 #16
0
    public void Init(SEmailSendUint email)
    {
        IconPoint.ClearChild();
        ItemData data = ItemDataManager.Instance.GetItemData(System.Convert.ToInt32(email.dwGoodsID));

        Title.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(data._szGoodsName), (TextColor)data._ColorLevel));
        //NGUITools.AddChild(IconPoint.gameObject,data._picPrefab);
        Background_spriteSwith.ChangeSprite(data._ColorLevel + 1);
        UI.CreatObjectToNGUI.InstantiateObj(data._picPrefab, IconPoint);
        num.SetText(email.dwGoodsNum.ToString());
    }
예제 #17
0
        public void Show(int progress, int itemID, int itemNumber, bool isLast, TrialsSettlementpanel_V2 myParent)
        {
            this.MyParent = myParent;
            TraceUtil.Log("获得物品ID:" + itemID);
            ItemData itemData    = ItemDataManager.Instance.GetItemData(itemID);
            string   typeStr     = string.Empty;
            string   itemNameStr = string.Empty;

            switch (itemID)
            {
            case 3050001:    //铜币
                typeStr     = LanguageTextManager.GetString(itemData._szGoodsName);
                itemNameStr = string.Format("+{0}", itemNumber);
                break;

            case 3050002:    //元宝
                typeStr     = LanguageTextManager.GetString(itemData._szGoodsName);
                itemNameStr = string.Format("+{0}", itemNumber);
                break;

            case 3050003:    //活力
                typeStr     = LanguageTextManager.GetString(itemData._szGoodsName);
                itemNameStr = string.Format("+{0}", itemNumber);
                break;

            case 3050004:    //经验
                typeStr     = LanguageTextManager.GetString(itemData._szGoodsName);
                itemNameStr = string.Format("+{0}", itemNumber);
                break;

            case 3050005:    //妖气值
                typeStr     = LanguageTextManager.GetString(itemData._szGoodsName);
                itemNameStr = string.Format("+{0}", itemNumber);
                break;

            case 3050006:    //修为
                typeStr     = LanguageTextManager.GetString(itemData._szGoodsName);
                itemNameStr = string.Format("+{0}", itemNumber);
                break;

            default:
                typeStr     = LanguageTextManager.GetString("IDS_H1_558");//道具
                itemNameStr = string.Format("{0}X{1}", NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemData._szGoodsName), GetItemColor(itemData)), itemNumber);
                break;
            }
            IsLastSprite.ApplyAllItem(P => P.ChangeSprite(isLast?2:1));
            TextColor colortype = isLast ? TextColor.purple : TextColor.white;

            ProgressLabel.SetText(LanguageTextManager.GetString(string.Format("IDS_H1_{0}", 534 + progress)));
            TypeLabel.SetText(NGUIColor.SetTxtColor(typeStr, colortype));
            ItemNameLabel.SetText(itemNameStr);
            TweenFloat.Begin(0.3f, 0, 1, SetPanelAlpha);
        }
예제 #18
0
 public void init(Jewel jewel, PassiveSkillData skill, bool IsSuit, int type)
 {
     if (IsSuit)
     {
         Title.SetText(LanguageTextManager.GetString("IDS_I9_6"));
     }
     else
     {
         Title.SetText(LanguageTextManager.GetString("IDS_I9_5"));
     }
     CreatObjectToNGUI.InstantiateObj(skill.SkillIconPrefab, iconPoint);
     Content.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(skill.SkillName) + ":", (TextColor)type) + NGUIColor.SetTxtColor("lv" + skill.SkillLevel, TextColor.ChatYellow) + " " + LanguageTextManager.GetString(skill.SkillDis));
 }
예제 #19
0
        //点击补签//
        public void OnRepairSignBtnClick(SignWeekInfo weekInfo)
        {
            SoundManager.Instance.PlaySoundEffect("Sound_Button_SignInRegist");
            selectRepairIndex = weekInfo.weekIndex;
            CGoodsInfo goodsInfo = signConfigData.dailyRewardList [weekInfo.weekIndex] [0];
            ItemData   getItem   = ItemDataManager.Instance.GetItemData(goodsInfo.itemID);
            string     goodName  = NGUIColor.SetTxtColor(LanguageTextManager.GetString(getItem._szGoodsName), (TextColor)getItem._ColorLevel);
            string     tipStr    = string.Format(LanguageTextManager.GetString("IDS_I26_20"), goodName, goodsInfo.itemCount,
                                                 CommonDefineManager.Instance.CommonDefine.SignInConsumption);

            UI.MessageBox.Instance.Show(4, "", tipStr, LanguageTextManager.GetString("IDS_H2_55"),
                                        LanguageTextManager.GetString("IDS_H2_28"), OnBuySureClick, OnBuyCancelClick);
        }
예제 #20
0
 public void Show(string numStr, string nameStr)
 {
     nameStr = NGUIColor.SetTxtColor(nameStr, TextColor.EquipmentGreen);
     if (m_IsShowLater)
     {
         m_CacheMessageList.Add(new CacheData(numStr, nameStr));
     }
     else
     {
         m_IsShowLater = true;
         ShowImmediately(numStr, nameStr);
         StartCoroutine("LateRestore");
     }
 }
예제 #21
0
        public void Show(string Message, ButtonCallBack SureBtnCallBack, ButtonCallBack CancelBtnCallBack, string sureBtnStr, string cancelBtnStr)
        {
            this.MsgLabel.SetText(Message);
            this.SureBtn.SetButtonText(sureBtnStr);
            this.CancelBtn.SetButtonText(cancelBtnStr);
            this.CancelBtnCallBack  = CancelBtnCallBack;
            transform.localPosition = new Vector3(0, 0, -100);
            int  UnlockBox = (ContainerInfomanager.Instance.GetContainerClientContsext(2).wMaxSize / 4) - 4;
            int  tackGold  = GetActiveEnergyHaveGold(UnlockBox);
            bool canBuy    = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_BINDPAY >= tackGold;

            TakeMoneyLabel.SetText(NGUIColor.SetTxtColor(tackGold.ToString(), canBuy?TextColor.white:TextColor.red));
            this.SureBtnCallback = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_BINDPAY >= tackGold?SureBtnCallBack:ShowNoMoneyTips;
        }
예제 #22
0
        void OnViewClick(object obj)
        {
            if (!m_isBoxOpen)
            {
                SoundManager.Instance.PlaySoundEffect("Sound_UIEff_CoopBoxOpen");
                for (int i = 0; i < m_result.sEquip.Length; i++)
                {
                    var itemData = ItemDataManager.Instance.GetItemData((int)m_result.sEquip[i].dwEquipId);
                    if (itemData != null)
                    {
                        UI_Items[i].spriteName = itemData.smallDisplay;
                        TextColor textColor = TextColor.white;
                        switch (itemData._ColorLevel)
                        {
                        case 0:
                            textColor = TextColor.EquipmentGreen;
                            break;

                        case 1:
                            textColor = TextColor.EquipmentBlue;
                            break;

                        case 2:
                            textColor = TextColor.EquipmentMagenta;
                            break;

                        case 3:
                            textColor = TextColor.EquipmentYellow;
                            break;
                        }
                        Label_ItemNames[i].text = NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemData._szGoodsName), textColor);
                        Label_ItemNums[i].text  = m_result.sEquip[i].dwEquipNum.ToString();
                    }
                    else
                    {
                        Rewards[i].SetActive(false);
                    }
                }

                GameObject eff = UI.CreatObjectToNGUI.InstantiateObj(Eff_BoxOpen, Button_View.transform);

                Swith_Reward.ChangeSprite(2);
                Vector3 rewardPos = Panel_Rewards.transform.localPosition;
                TweenPosition.Begin(Panel_Rewards.gameObject, 0.2f, rewardPos + Vector3.left * 50, rewardPos);
                TweenAlpha.Begin(Panel_Rewards.gameObject, 0.2f, 0, 1f, null);

                m_isBoxOpen = true;
            }
        }
예제 #23
0
    public string GetGoodsLevel(int GoodsID)
    {
        ItemData  data = ItemDataManager.Instance.GetItemData(GoodsID);
        TextColor color;

        if (data._AllowLevel > PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_LEVEL)
        {
            color = TextColor.red;
        }
        else
        {
            color = TextColor.green;
        }
        return(NGUIColor.SetTxtColor("Lv" + data._AllowLevel, color));
    }
예제 #24
0
//		public IEnumerator ShowSwallow2()
//		{
//			SwallowEff2.SetActive(true);
//			yield return new WaitForSeconds(1);
//			SwallowEff2.SetActive(false);
//		}
        public void  Init(ItemFielInfo itemFileInfo)
        {
            if (itemFileInfo != null)
            {
                HideOrShow(true);
                Jewel jewel = ItemDataManager.Instance.GetItemData(itemFileInfo.LocalItemData._goodID) as Jewel;
                JewelName.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemFileInfo.LocalItemData._szGoodsName), (TextColor)itemFileInfo.LocalItemData._ColorLevel));
                JewelPosition.SetText(ItemInfoTips_Jewel.getJewelPosion(jewel.StonePosition, "、"));
                JewelLevel.SetText(itemFileInfo.materiel.ESTORE_FIELD_LEVEL);
                IconPoint.ClearChild();
                CreatObjectToNGUI.InstantiateObj(jewel._picPrefab, IconPoint);
                if (itemFileInfo.materiel.ESTORE_FIELD_LEVEL < jewel.MaxLevel)
                {
                    Progress_text.gameObject.SetActive(true);
                    FullLevel.SetActive(false);

                    Progress_text.SetText(itemFileInfo.materiel.ESTORE_FIELD_EXP + "/" + jewel.StoneExp[itemFileInfo.materiel.ESTORE_FIELD_LEVEL - 1]);
                    Progress_slider.sliderValue = (float)itemFileInfo.materiel.ESTORE_FIELD_EXP / (float)jewel.StoneExp[itemFileInfo.materiel.ESTORE_FIELD_LEVEL - 1];
                }
                else
                {
                    Progress_text.gameObject.SetActive(false);
                    Progress_slider.sliderValue = 1;
                    FullLevel.SetActive(true);
                }
                //服务器bug器魂初始等级为0为了调试这里+1
                currentskill = JewelBesetManager.GetInstance().passiveSkillDataBase._dataTable.First(c => c.SkillID == jewel.PassiveSkill && c.SkillLevel == itemFileInfo.materiel.ESTORE_FIELD_LEVEL);
                CurrentAtt.Init(currentskill);
                if (itemFileInfo.materiel.ESTORE_FIELD_LEVEL < jewel.MaxLevel)
                {
                    NextrAtt.gameObject.SetActive(true);
                    nextSkill = JewelBesetManager.GetInstance().passiveSkillDataBase._dataTable.First(c => c.SkillID == jewel.PassiveSkill && c.SkillLevel == (itemFileInfo.materiel.ESTORE_FIELD_LEVEL + 1));
                    NextrAtt.Init(nextSkill);
                    NoneAtt.gameObject.SetActive(false);
                }
                else
                {
                    NextrAtt.gameObject.SetActive(false);
                    NoneAtt.gameObject.SetActive(true);
                }
            }
            else
            {
                HideOrShow(false);
            }
        }
예제 #25
0
 public virtual void Init(ItemFielInfo itemFielInfo, bool isLeftPos, bool CanSale)
 {
     IsLeftPos      = isLeftPos;
     m_ItemFielInfo = itemFielInfo;
     if (CanSale)
     {
         UnableSaleLabel.gameObject.SetActive(false);
         ItemPriceLabel.gameObject.SetActive(true);
         ItemPriceLabel.SetText(itemFielInfo.LocalItemData._SaleCost + itemFielInfo.equipmentEntity.ITEM_FIELD_VISIBLE_COMM);
     }
     else
     {
         ItemPriceLabel.gameObject.SetActive(false);
         UnableSaleLabel.gameObject.SetActive(true);
         UnableSaleLabel.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString("IDS_I1_50"), TextColor.red));
     }
     // Close();
 }
예제 #26
0
    /// <summary>
    /// 装备名称+装备强化等级  颜色与品质相关
    /// </summary>
    /// <returns>The equip name.</returns>
    /// <param name="itemFileInfo">Item file info.</param>
    private static string GetEquipName(ItemFielInfo itemFileInfo)
    {
        if (itemFileInfo == null)
        {
            return(string.Empty);
        }
        if (itemFileInfo.sSyncContainerGoods_SC.uidGoods != 0)
        {
            string format = PlayerDataManager.Instance.GetEquipmentStarLevel((EquiptSlotType)int.Parse((itemFileInfo.LocalItemData as EquipmentData)._vectEquipLoc)) == 0 ? "{0}" : "{0}({1}{2})";// itemFileInfo.equipmentEntity.EQUIP_FIELD_START_LEVEL == 0 ? "{0}" : "{0}({1}{2})";

            //var equipName = string.Format(format, LanguageTextManager.GetString(this.m_itemFielInfo.LocalItemData._szGoodsName),
            //    this.m_itemFielInfo.equipmentEntity.EQUIP_FIELD_START_LEVEL,
            //    LanguageTextManager.GetString("IDS_H1_190"));  //风雨刀(1星)
            int equipLv = PlayerDataManager.Instance.GetEquipmentStrengthLevel((EquiptSlotType)int.Parse((itemFileInfo.LocalItemData as EquipmentData)._vectEquipLoc));

            string equipStr = string.Empty;
            if (equipLv == 0)
            {
                equipStr = "";
            }
            else
            {
                equipStr = "+" + equipLv.ToString();
            }

            var equipName = LanguageTextManager.GetString(itemFileInfo.LocalItemData._szGoodsName);
            List <JewelInfo> jewelInfos = PlayerDataManager.Instance.GetJewelInfo((EquiptSlotType)int.Parse((itemFileInfo.LocalItemData as EquipmentData)._vectEquipLoc));

            if (jewelInfos[0].JewelID != 0 && jewelInfos[1].JewelID != 0)
            {
                Jewel jewel1 = ItemDataManager.Instance.GetItemData(jewelInfos[0].JewelID) as Jewel;
                Jewel jewel2 = ItemDataManager.Instance.GetItemData(jewelInfos[1].JewelID) as Jewel;
                if (jewel1.StoneGrop != 0 && jewel1.StoneGrop == jewel2.StoneGrop)
                {
                    equipName = LanguageTextManager.GetString(jewel1.StoneGropEquipName) + equipName;
                }
            }
            return(equipName.SetColor((TextColorType)itemFileInfo.LocalItemData._ColorLevel) + equipStr.SetColor((TextColorType)itemFileInfo.LocalItemData._ColorLevel));
        }
        else
        {
            return(NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemFileInfo.LocalItemData._szGoodsName), (TextColor)itemFileInfo.LocalItemData._ColorLevel));
        }
    }
예제 #27
0
        private float m_gapTime  = 1f;       //间隔

        public void Show(string numStr, int itemID)
        {
            var goodData = ItemDataManager.Instance.GetItemData(itemID);

            if (goodData == null)
            {
                return;
            }
            TextColor textColor = TextColor.white;

            switch (goodData._ColorLevel)
            {
            case 0:
                textColor = TextColor.EquipmentGreen;
                break;

            case 1:
                textColor = TextColor.EquipmentBlue;
                break;

            case 2:
                textColor = TextColor.EquipmentMagenta;
                break;

            case 3:
                textColor = TextColor.EquipmentYellow;
                break;

            default:
                break;
            }
            string nameStr = NGUIColor.SetTxtColor(LanguageTextManager.GetString(goodData._szGoodsName), textColor);

            if (m_IsShowLater)
            {
                m_CacheMessageList.Add(new CacheData(numStr, nameStr));
            }
            else
            {
                m_IsShowLater = true;
                ShowImmediately(numStr, nameStr);
                StartCoroutine("LateRestore");
            }
        }
예제 #28
0
    public string GetProfession(int GoodsID)
    {
        // 0=武器、(1+2+3+4+5+6+7+8+9+10)=时装(不包括括号)、11=头饰、12=衣服、13=鞋子、14=饰品、15=徽章
        string str = "";

        string[] tem = ((EquipmentData)ItemDataManager.Instance.GetItemData(GoodsID))._AllowProfession.Split('+');
        foreach (string item in tem)
        {
            if (int.Parse(item) == PlayerManager.Instance.FindHeroDataModel().PlayerValues.PlayerCommonValue.PLAYER_FIELD_VISIBLE_VOCATION)
            {
                str += NGUIColor.SetTxtColor(ProfessionDic[item], TextColor.ChatYellow) + " ";
            }
            else
            {
                str += NGUIColor.SetTxtColor(ProfessionDic[item], TextColor.red) + " ";
            }
        }
        return(str);
    }
예제 #29
0
    public void Init(ItemFielInfo itemfileInfo)
    {
        IconItem.Init(itemfileInfo);
        Lable_name.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemfileInfo.LocalItemData._szGoodsName), (TextColor)itemfileInfo.LocalItemData._ColorLevel));
        Lable_position.SetText(EquipmentUpgradeDataManger.Instance.PositionDic[itemfileInfo.LocalItemData._GoodsSubClass]);
        Lable_Currentforce.SetText((int)EquipItem.GetEquipForce(itemfileInfo));
        int addforce = ((int)EquipItem.GetNextLevelEquipForce(itemfileInfo, UpgradeType.Strength) - (int)EquipItem.GetEquipForce(itemfileInfo));

        if (addforce > 0)
        {
            Lable_addForce.gameObject.SetActive(true);
            Lable_addForce.SetText("+" + addforce);
        }
        else
        {
            Lable_addForce.gameObject.SetActive(false);
        }
        Lable_strengthLevle.SetText(EquipmentUpgradeDataManger.Instance.GetStrengthLevel(itemfileInfo));
        TaskGuideBtnRegister();
    }
예제 #30
0
 public void Show(ItemFielInfo itemFileInfo)
 {
     Point_Icon.ClearChild();
     Lable_itemName.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemFileInfo.LocalItemData._szGoodsName), (TextColor)itemFileInfo.LocalItemData._ColorLevel));
     CreatObjectToNGUI.InstantiateObj(itemFileInfo.LocalItemData._DisplayIdSmall, Point_Icon);
     SpriteSwith_IconBG.ChangeSprite(itemFileInfo.LocalItemData._ColorLevel + 1);
     ResetPathLinkItem();
     for (int i = 0; i < itemFileInfo.LocalItemData.LinkIds.Length; i++)
     {
         if (itemFileInfo.LocalItemData.LinkIds[i] != "0")
         {
             pathLinkItems[i].Show(itemFileInfo.LocalItemData.LinkIds[i]);
             pathLinkItems[i].gameObject.SetActive(true);
         }
         else
         {
             pathLinkItems[i].gameObject.SetActive(false);
         }
     }
 }