public void updateViewByUpgradeSuccess(int unit_idx)
    {
        if (InventoryVC.checkInst())
        {
            InventoryVC inventory = InventoryVC.Inst;
            inventory.FrameMain.SetActive(true);

            setData();
            frameScroll.SetActive(true);
            if (SubViewUpgrade.checkInst() == true)
            {
                Destroy(SubViewUpgrade.Inst.gameObject);
            }
            resetScroll();
            int update_unit_arr_idx = 0;
            for (int i = 0; i < EquipmentList[(int)selectedMenu].Count; i++)
            {
                if (EquipmentList[(int)selectedMenu][i].index == unit_idx)
                {
                    update_unit_arr_idx = i;
                    break;
                }
            }

            scrollList.SetContentOffset(update_unit_arr_idx);
            scrollList.ScrollViewDidScroll();
            updateDetailInfo(update_unit_arr_idx);
        }
    }
Beispiel #2
0
 //스크롤 종류에 따른 Sort버튼 Text 업데이트
 private void updateViewText()
 {
     if (PartyInfoVC.checkInst() && !SubViewEquipment.checkInst())
     {
         PartyInfoVC party_info = PartyInfoVC.Inst;
         if (party_info.currentScrollType == PartyInfoVC.scroll_type.SERVANT_INFO)
         {
             textSort[0].text = "POWER";
             textSort[1].text = "GRADE";
             textSort[2].text = "LEVEL";
             textSort[3].text = "GOT TIME";
             textSort[4].text = "JOB";
         }
         else
         {
             textSort[0].text = "POWER";
             textSort[1].text = "GRADE";
             textSort[2].text = "LEVEL";
             textSort[3].text = "GOT TIME";
             textSort[4].text = "UPGRADE";
         }
     }
     else if (InventoryVC.checkInst() || SubViewEquipment.checkInst())
     {
         textSort[0].text = "POWER";
         textSort[1].text = "GRADE";
         textSort[2].text = "TIER";
         textSort[3].text = "GOT TIME";
         textSort[4].text = "UPGRADE";
     }
 }
    public void updateSelectedUnitInfo()
    {
        if (selected_unit_idx < 0 || selected_unit_idx >= total_item_num)
        {
            DebugLog.Log(false, "Invalid select_unit_idx by scrollmove select");
            return;
        }

        if (LobbyManager.Inst.popupState == POPUP_STATE.Servant)
        {
            bool none_subview = true;
            if (SubViewDeconstruction.checkInst() || SubViewEquipment.checkInst() || SubViewUpgrade.checkInst())
            {
                none_subview = false;
            }

            if (PartyInfoVC.checkInst() && none_subview)
            {
                PartyInfoVC partyInfo = PartyInfoVC.Inst;
                if (partyInfo.selectedMenu == PartyInfoVC.menu_type.SERVANT || partyInfo.selectedMenu == PartyInfoVC.menu_type.MONSTER)
                {
                    if (partyInfo.currentScrollType == PartyInfoVC.scroll_type.SERVANT_INFO || partyInfo.currentScrollType == PartyInfoVC.scroll_type.MONSTER_INFO)
                    {
                        partyInfo.updateDetailInfo(selected_main_idx);
                    }
                }
            }
        }
        else if (LobbyManager.Inst.popupState == POPUP_STATE.Weapon)
        {
            if (InventoryVC.checkInst())
            {
                if (InventoryVC.Inst.selectedMenu == Inventory_Menu_Type.ITEM)
                {
                    if (ItemInfoManager.Inst.ItemList.Count > 0)
                    {
                        ItemInfoManager.Inst.updateItemDetailInfo(selected_main_idx);
                    }
                }
                else
                {
                    bool none_subview = true;
                    if (SubViewDeconstruction.checkInst() || SubViewEquipment.checkInst() || SubViewUpgrade.checkInst())
                    {
                        none_subview = false;
                    }

                    if (InventoryVC.checkInst() && none_subview)
                    {
                        if (EquipmentInfoManager.Inst.EquipmentList[(int)EquipmentInfoManager.Inst.GetSelectedMenu()].Count > 0)
                        {
                            EquipmentInfoManager.Inst.updateDetailInfo(selected_main_idx);
                        }
                    }
                }
            }
        }
    }
Beispiel #4
0
    public void OnClickClose()
    {
        if (PartyInfoVC.checkInst())
        {
            PartyInfoVC.Inst.frameScroll.SetActive(true);
        }
        else if (InventoryVC.checkInst())
        {
            InventoryVC.Inst.FrameMain.SetActive(true);
        }

        Destroy(this.gameObject);
    }
    //강화 완료(서버에서 응답) 후 화면 전체 갱신
    public void updateViewByUpgradeFail()
    {
        if (InventoryVC.checkInst())
        {
            InventoryVC inventory = InventoryVC.Inst;
            inventory.FrameMain.SetActive(true);

            updateAllView();

            if (SubViewUpgrade.checkInst() == true)
            {
                Destroy(SubViewUpgrade.Inst.gameObject);
            }
        }
    }
Beispiel #6
0
    public void OnClickSortType(int btn_idx)
    {
        sortType = (SORT_TYPE)btn_idx;
        updateSortView();

        if (PartyInfoVC.checkInst())
        {
            if (SubViewEquipment.checkInst())
            {
                DebugLog.Log(false, "Reset Equip List");
                SubViewEquipment.Inst.ResetScrollListBySortType(sortType);
            }
            else if (SubViewDeconstruction.checkInst())
            {
                DebugLog.Log(false, "Reset deconstruct List");
                SubViewDeconstruction.Inst.ResetScrollListBySortType(sortType);
            }
            else if (SubViewUpgrade.checkInst())
            {
                DebugLog.Log(false, "Reset SubViewUpgrade List");
                SubViewUpgrade.Inst.ResetScrollListBySortType(sortType);
            }
            else
            {
                DebugLog.Log(false, "Reset Partyinfo List");
                PartyInfoVC.Inst.ResetScrollListBySortType(sortType);
            }
        }
        else if (InventoryVC.checkInst())
        {
            if (SubViewDeconstruction.checkInst())
            {
                DebugLog.Log(false, "Reset deconstruct List");
                SubViewDeconstruction.Inst.ResetScrollListBySortType(sortType);
            }
            else if (SubViewUpgrade.checkInst())
            {
                DebugLog.Log(false, "Reset SubViewUpgrade List");
                SubViewUpgrade.Inst.ResetScrollListBySortType(sortType);
            }
            else
            {
                DebugLog.Log(false, "Reset Inven List");
                EquipmentInfoManager.Inst.ResetScrollListBySortType(sortType);
            }
        }
    }
    public void OnClickClose()
    {
        if (PartyInfoVC.checkInst())
        {
            if ((dType == DECONSTRUCTION_TYPE.SERVANT && partyInfo.ServantList != null) ||
                (dType == DECONSTRUCTION_TYPE.MONSTER && partyInfo.MonsterList != null))
            {
                PartyInfoVC.Inst.frameScroll.SetActive(true);
            }
        }
        else if (InventoryVC.checkInst())
        {
            InventoryVC.Inst.FrameMain.SetActive(true);
        }

        Destroy(this.gameObject);
    }
    //분해 완료(서버에서 응답) 후 화면 전체 갱신
    public void updateViewFinishRequest()
    {
        OnClickButtonClear();

        if (PartyInfoVC.checkInst())
        {
            PartyInfoVC patyInfo = PartyInfoVC.Inst;
            patyInfo.setData();

            patyInfo.resetScroll();

            patyInfo.updateDetailInfo(patyInfo.scrollList.getFirstItemOrder());

            setData();
            scrollList.rectTrScrollLayer.anchoredPosition = Vector2.zero;
            scrollList.SetItemOrder(getOrder());
            scrollList.ScrollViewDidScroll();
        }
        else if (InventoryVC.checkInst())
        {
            InventoryVC inventory = InventoryVC.Inst;
            if (inventory.FrameEquipmentInfo.activeSelf)
            {
                if (EquipmentInfoManager.checkInst())
                {
                    EquipmentInfoManager equipmentInfo = EquipmentInfoManager.Inst;
                    equipmentInfo.setData();
                    if (equipmentInfo.EquipmentList[(int)equipmentInfo.selectedMenu].Count > 0)
                    {
                        equipmentInfo.resetScroll();
                        equipmentInfo.updateDetailInfo(equipmentInfo.scrollList.getFirstItemOrder());
                    }
                    else
                    {
                        equipmentInfo.updateAllView();
                    }

                    setData();

                    scrollList.rectTrScrollLayer.anchoredPosition = Vector2.zero;
                    scrollList.SetItemOrder(getOrder());
                    scrollList.ScrollViewDidScroll();
                }
            }
        }
    }