public void Show(PackInfoPanel myParent) { base.Close(); base.TweenShow(); MyParent = myParent; SetTitleBtnActive(true); m_ResetContainerButton.OnShow(); DoForTime.DoFunForFrame(1, OnShowItemTypeButtonClick, ShowItemBtnType.All); }
public void TweenShow(PackInfoPanel myParent) { this.MyParent = myParent; if (IsShow) { return; } IsShow = true; MyParent.m_ContainerItemListPanel.SetTitleBtnActive(false); float animTime = 0.3f; if (FloatObj != null) { DestroyImmediate(FloatObj); } FloatObj = TweenFloat.Begin(animTime, MyUIPanel.alpha, 1, SetMyPanelAlpha); TweenPosition.Begin(gameObject, animTime, transform.localPosition, ShowPos); Init(); }
public void Init(PackInfoPanel myParent) { MyParent = myParent; }
/// <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; } }