/// <summary> /// 初始装备信息栏,添加信息prefab /// </summary> /// <param name="itemFielInfo">Item fiel info.</param> public void Show(ItemFielInfo itemFielInfo, bool isEquiptItem, bool isLeftPos) { Btn_PathLink.gameObject.SetActive(false); ISShowing = true; this.m_curGoodID = itemFielInfo.LocalItemData._goodID; this.m_curItemFielInfo = itemFielInfo; jewel = ItemDataManager.Instance.GetItemData(m_curGoodID) as Jewel; SetTitleColor(jewel._ColorLevel, LanguageTextManager.GetString(itemFielInfo.LocalItemData._szGoodsName)); Background_spr.ChangeSprite(jewel._ColorLevel + 1); JewelType.ChangeSprite(jewel.StoneType + 1); JewelLevel.SetText(itemFielInfo.materiel.ESTORE_FIELD_LEVEL); ItemPriceLabel.SetText(jewel._SaleCost); JewelPosition.SetText(ItemInfoTips_Jewel.getJewelPosion(jewel.StonePosition, "、")); if (itemFielInfo.materiel.ESTORE_FIELD_LEVEL == jewel.MaxLevel) { ProgressText.SetText("[fe768b]满级[-]"); ProgressSlider.sliderValue = 1; } else { ProgressText.SetText(itemFielInfo.materiel.ESTORE_FIELD_EXP + "/" + jewel.StoneExp [itemFielInfo.materiel.ESTORE_FIELD_LEVEL - 1]); ProgressSlider.sliderValue = (float)itemFielInfo.materiel.ESTORE_FIELD_EXP / (float)jewel.StoneExp [itemFielInfo.materiel.ESTORE_FIELD_LEVEL - 1]; } IconPos.ClearChild(); CreatObjectToNGUI.InstantiateObj(itemFielInfo.LocalItemData._picPrefab, IconPos); CreatAttribute(itemFielInfo); TweenShow(); }
// 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); } }
public void Show(Jewel jewel, bool isEquiptItem, bool isLeftPos) { Btn_PathLink.gameObject.SetActive(true); ISShowing = true; this.m_curGoodID = jewel._goodID; SetTitleColor(jewel._ColorLevel, LanguageTextManager.GetString(jewel._szGoodsName)); Background_spr.ChangeSprite(jewel._ColorLevel + 1); JewelType.ChangeSprite(jewel.StoneType + 1); JewelLevel.SetText(1); ItemPriceLabel.SetText(jewel._SaleCost); JewelPosition.SetText(ItemInfoTips_Jewel.getJewelPosion(jewel.StonePosition, "、")); ProgressText.SetText(jewel.StoneStartExp + "/" + jewel.StoneExp [0]); ProgressSlider.sliderValue = (float)jewel.StoneStartExp / (float)jewel.StoneExp [0]; IconPos.ClearChild(); CreatObjectToNGUI.InstantiateObj(jewel._picPrefab, IconPos); CreatAttribute(jewel); //TweenShow(); transform.localPosition = Vector3.zero; }
/// <summary> /// 需要展示详细属性的调这个,比如在背包里 /// </summary> /// <param name="itemFielInfo">Item fiel info.</param> /// <param name="myParent">My parent.</param> public void Show(ItemFielInfo itemFielInfo, PackInfoPanel myParent) { m_PackRightBtnManager.gameObject.SetActive(true); HasClik = false; bool ShowPathLinkBtn = false; this.MyParent = myParent; CurrentItem = itemFielInfo; TweenAlpha.Begin(m_PackRightBtnManager.gameObject, 0.1f, 0, 1, null); TweenPosition.Begin(m_PackRightBtnManager.gameObject, 0.1f, m_PackRightBtnManager.transform.localPosition, RightBtnShowPos); transform.localPosition = new Vector3(0, 0, -150); InitButton(itemFielInfo); switch (itemFielInfo.LocalItemData._GoodsClass) { case 1: //装备显示 bool isEquiptItem = ContainerInfomanager.Instance.GetEquiptItemList().FirstOrDefault(P => P == itemFielInfo) != null; if (isEquiptItem) { if (EquiptItemTips_equipt == null) { EquiptItemTips_equipt = CreatObjectToNGUI.InstantiateObj(EquiptItemTipsPrefab, transform).GetComponent <ItemInfoTips_Equipment>(); } EquiptItemTips_equipt.Show(itemFielInfo, true, true, ShowPathLinkBtn); } else { if (EquiptItemTips_normal == null) { EquiptItemTips_normal = CreatObjectToNGUI.InstantiateObj(EquiptItemTipsPrefab, transform).GetComponent <ItemInfoTips_Equipment>(); } EquiptItemTips_normal.Show(itemFielInfo, false, false, ShowPathLinkBtn); ItemFielInfo equiptPairItem = ContainerInfomanager.Instance.GetEquiptItemList().FirstOrDefault (P => (P.LocalItemData as EquipmentData)._vectEquipLoc == (itemFielInfo.LocalItemData as EquipmentData)._vectEquipLoc); if (equiptPairItem != null) { if (EquiptItemTips_equipt == null) { EquiptItemTips_equipt = CreatObjectToNGUI.InstantiateObj(EquiptItemTipsPrefab, transform).GetComponent <ItemInfoTips_Equipment>(); } EquiptItemTips_equipt.Show(equiptPairItem, true, true, ShowPathLinkBtn); } } break; case 2: if (itemFielInfo.LocalItemData._GoodsSubClass == 4) { //if(GiftPanelItemtips!=null){Destroy(GiftPanelItemtips);} if (GiftPanelItemtips == null) { GiftPanelItemtips = CreatObjectToNGUI.InstantiateObj(GiftItemTipsPrefab, transform).GetComponent <GiftPanel>(); } GiftPanelItemtips.Show(itemFielInfo); GiftPanelItemtips.CallBackOnSellClick = OnButtonClick; GiftPanelItemtips.CallBackOnCloseHandle = Close; } else { if (MedicineItemtips == null) { MedicineItemtips = CreatObjectToNGUI.InstantiateObj(MedicineItemTipsPrefab, transform).GetComponent <ItemInfoTips_Medicine>(); } MedicineItemtips.Show(itemFielInfo); } break; case 3: if (itemFielInfo.LocalItemData._GoodsSubClass == 3) { if (EquiptItemTips_Jewel == null) { EquiptItemTips_Jewel = CreatObjectToNGUI.InstantiateObj(JewelItemTipsPrefab, transform).GetComponent <ItemInfoTips_Jewel>(); } EquiptItemTips_Jewel.Show(itemFielInfo, true, true); } else { if (MedicineItemtips == null) { MedicineItemtips = CreatObjectToNGUI.InstantiateObj(MedicineItemTipsPrefab, transform).GetComponent <ItemInfoTips_Medicine>(); } MedicineItemtips.Show(itemFielInfo); } break; default: break; } }
/// <summary> ///需要展示基础属性的调这个,这个不会考虑物品等级,强化等 /// </summary> /// <param name="ItemID">Item I.</param> public void Show(int ItemID) { SoundManager.Instance.PlaySoundEffect("Sound_Button_Default_Open"); HasClik = false; bool ShowPathLinkBtn = true; // this.MyParent = myParent; //CurrentItem = itemFielInfo; ItemFielInfo itemFielInfo = new ItemFielInfo(ItemID); CurrentItem = itemFielInfo; if (itemFielInfo.LocalItemData == null) { return; } switch (itemFielInfo.LocalItemData._GoodsClass) { case 1: //装备显示 if (EquiptItemTips_normal == null) { EquiptItemTips_normal = CreatObjectToNGUI.InstantiateObj(EquiptItemTipsPrefab, transform).GetComponent <ItemInfoTips_Equipment>(); } EquiptItemTips_normal.Show(itemFielInfo, false, false, ShowPathLinkBtn); break; case 2: if (itemFielInfo.LocalItemData._GoodsSubClass == 4) { //if(GiftPanelItemtips!=null){Destroy(GiftPanelItemtips);} if (GiftPanelItemtips == null) { GiftPanelItemtips = CreatObjectToNGUI.InstantiateObj(GiftItemTipsPrefab, transform).GetComponent <GiftPanel>(); } GiftPanelItemtips.Show(itemFielInfo, true); // GiftPanelItemtips.CallBackOnSellClick = OnButtonClick; GiftPanelItemtips.CallBackOnCloseHandle = Close; } else { if (MedicineItemtips == null) { MedicineItemtips = CreatObjectToNGUI.InstantiateObj(MedicineItemTipsPrefab, transform).GetComponent <ItemInfoTips_Medicine>(); } MedicineItemtips.Show(itemFielInfo.LocalItemData as MedicamentData); } break; case 3: if (itemFielInfo.LocalItemData._GoodsSubClass == 9) { return; } if (itemFielInfo.LocalItemData._GoodsSubClass == 3) { if (EquiptItemTips_Jewel == null) { EquiptItemTips_Jewel = CreatObjectToNGUI.InstantiateObj(JewelItemTipsPrefab, transform).GetComponent <ItemInfoTips_Jewel>(); } EquiptItemTips_Jewel.Show(itemFielInfo.LocalItemData as Jewel, true, true); } else { if (MedicineItemtips == null) { MedicineItemtips = CreatObjectToNGUI.InstantiateObj(MedicineItemTipsPrefab, transform).GetComponent <ItemInfoTips_Medicine>(); } MedicineItemtips.Show(itemFielInfo.LocalItemData); } break; default: return; } // TweenAlpha.Begin(m_PackRightBtnManager.gameObject,0.1f,0,1,null); // TweenPosition.Begin(m_PackRightBtnManager.gameObject,0.1f,m_PackRightBtnManager.transform.localPosition,RightBtnShowPos); transform.localPosition = new Vector3(0, 0, -150); //InitButton(itemFielInfo); m_PackRightBtnManager.gameObject.SetActive(false); }