Ejemplo n.º 1
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);
                        }
                    }
                }
            }
        }
    }
Ejemplo n.º 3
0
    public void OnClickClose()
    {
        if (PartyInfoVC.checkInst())
        {
            PartyInfoVC.Inst.frameScroll.SetActive(true);
        }
        else if (InventoryVC.checkInst())
        {
            InventoryVC.Inst.FrameMain.SetActive(true);
        }

        Destroy(this.gameObject);
    }
Ejemplo n.º 4
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();
                }
            }
        }
    }
    //PartyInfo 화면에서 유닛을 선택했을때 해당 모델로 교체
    public void ChangeSelectedUnitModel()
    {
        //서브뷰 상태일때는 Return;
        //if (SubViewDeconstruction.checkInst() || SubViewUpgrade.checkInst())
        //{
        //    return;
        //}

        if (PartyInfoVC.checkInst())
        {
            PartyInfoVC partyInfo = PartyInfoVC.Inst;

            if (objMonsterModel != null)
            {
                Destroy(objMonsterModel);
            }

            if (partyInfo.selectedMenu == PartyInfoVC.menu_type.SERVANT)
            {
                objServantModel.SetActive(false);
                int servant_id = partyInfo.ServantList[partyInfo.selected_unit_idx].id;
                characterCustom.jobIndex   = CSVData.Inst.GetServantData(servant_id).job;
                characterCustom.headIndex  = CSVData.Inst.GetServantData(servant_id).head;
                characterCustom.hairIndex  = CSVData.Inst.GetServantData(servant_id).hair;
                characterCustom.isMan      = CSVData.Inst.GetServantData(servant_id).gender;
                characterCustom.isChildren = CSVData.Inst.GetServantData(servant_id).body;
                characterCustom.Refresh();
                objServantModel.SetActive(true);
                changeCameraOffsetByModelHeight(objServantModel.GetComponent <CharInfo>().Height);
            }
            else if (partyInfo.selectedMenu == PartyInfoVC.menu_type.MONSTER)
            {
                objServantModel.SetActive(false);
                objMonsterModel = Instantiate(Resources.Load <GameObject>("InGameCharacterPrefabs/" + CSVData.Inst.GetMonsterDBResourceModel(partyInfo.MonsterList[partyInfo.selected_unit_idx].id)),
                                              characterCustom.transform);
                changeCameraOffsetByModelHeight(objMonsterModel.GetComponent <CharInfo>().Height);
            }
            DebugLog.Log(false, "change update model");
        }
    }