| | |
| | | private List<GodBeastBagClass> GodBeastBagList = new List<GodBeastBagClass>();
|
| | | private List<int> DeleteIndexList = new List<int>();
|
| | | private int Quality = 10;
|
| | | private int GetJumpIndex = 0;//获取跳转下标
|
| | | PlayerPackModel _playerPack; |
| | | PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } }
|
| | | GodBeastModel godBeastModel { get { return ModelCenter.Instance.GetModel<GodBeastModel>(); } }
|
| | |
| | | int childCode = 0;
|
| | | for (childCode = 0; childCode < cell.transform.childCount; childCode++)
|
| | | {
|
| | |
|
| | | int ItemPos = childCode + 1;
|
| | | GodBeastChildNodes GodBeastChildNodes = cell.transform.GetChild(childCode).GetComponent<GodBeastChildNodes>();
|
| | | int cellCount = (cell.transform.childCount) * gridlineIndex + (childCode + 1);
|
| | | if (cellCount > 100)
|
| | |
| | | GodBeastChildNodes.ButtonDown.RemoveAllListeners();
|
| | | if (cellCount - 1 < GodBeastBagList.Count)
|
| | | {
|
| | | int index = cellCount - 1;
|
| | | int index = cellCount - 1; |
| | | GodBeastChildNodes.ItemCell.gameObject.SetActive(true);
|
| | | GodBeastBagClass godBeastBagClass = GodBeastBagList[index];
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptDogzItem, godBeastBagClass.Index);
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (godBeastModel.Absorption_Dic.ContainsKey(godBeastBagClass.Index))
|
| | | {
|
| | | GodBeastChildNodes.ChoosenImg.SetActive(true);
|
| | | if (itemModel.EquipPlace <= 0 && itemModel.itemInfo.ItemCount>1)
|
| | | if (itemModel.EquipPlace <= 0 && itemModel.itemInfo.ItemCount > 1)
|
| | | {
|
| | | GodBeastChildNodes.NumberNow.gameObject.SetActive(true);
|
| | | GodBeastChildNodes.NumberNow.text = godBeastModel.Absorption_Dic[godBeastBagClass.Index].ToString();
|
| | | GodBeastChildNodes.NumberNow.text = godBeastModel.Absorption_Dic[godBeastBagClass.Index].ToString() + "/" + itemModel.itemInfo.ItemCount;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (itemModel.EquipPlace <= 0 && itemModel.itemInfo.ItemCount > 1)
|
| | | {
|
| | | GodBeastChildNodes.NumberNow.gameObject.SetActive(true);
|
| | | GodBeastChildNodes.NumberNow.text = itemModel.itemInfo.ItemCount.ToString();
|
| | | }
|
| | | }
|
| | | GodBeastChildNodes.GetGodBeastIndex(godBeastBagClass.Index);
|
| | |
| | | {
|
| | | godBeastModel.Crystal_ItemModel = itemModel;
|
| | | godBeastModel.ItemInde = godBeastBagClass.Index;
|
| | | GetJumpIndex = godBeastBagClass.Index;
|
| | | m_ScrollerController.JumpIndex(JumpIndex());
|
| | | godBeastModel.ItemPos = ItemPos;
|
| | | WindowCenter.Instance.Open<CrystalSelectionWin>();
|
| | |
|
| | | }
|
| | | |
| | | } |
| | | }
|
| | | godBeastModel.AbsorbEventUpdate();
|
| | | });
|
| | | }
|
| | | }
|
| | | } |
| | | private int JumpIndex()
|
| | | {
|
| | | int jumpIndex = 0;
|
| | | for (int i = 0; i < GodBeastBagList.Count; i++)
|
| | | {
|
| | | if (GodBeastBagList[i].Index == GetJumpIndex)
|
| | | {
|
| | | jumpIndex= Mathf.CeilToInt((float)(i+1) / 3);
|
| | | }
|
| | | }
|
| | | if (jumpIndex >= 1)
|
| | | {
|
| | | jumpIndex -= 1;
|
| | | }
|
| | | return jumpIndex;
|
| | | } |
| | | } |
| | | |
| | | } |