public void updateAllView() { FrameEquipmentInfo.SetActive(false); FrameNoneEquipment.SetActive(false); if (InventoryVC.Inst.selectedMenu == Inventory_Menu_Type.WEAPON || InventoryVC.Inst.selectedMenu == Inventory_Menu_Type.ARMOR || InventoryVC.Inst.selectedMenu == Inventory_Menu_Type.ACCESSORY) { selectedMenu = InventoryVC.Inst.selectedMenu; setData(); if (EquipmentList[(int)selectedMenu].Count > 0) { FrameEquipmentInfo.SetActive(true); if (is_init_scroll) { resetScroll(); } else { is_init_scroll = true; initScrollList(); } textOwned.text = string.Format("{0}", EquipmentList[(int)selectedMenu].Count); textTotal.text = string.Format("/ {0}", UserDataManager.Inst.GetUserInventoryInfo().equipmentInventory); if (EquipmentList[(int)selectedMenu].Count >= UserDataManager.Inst.GetUserInventoryInfo().equipmentInventory) { textOwned.color = Color.red; } else { textOwned.color = Color.white; } updateDetailInfo(scrollList.getFirstItemOrder()); } else { FrameNoneEquipment.SetActive(true); textNoneEquipment.text = string.Format("None {0}", selectedMenu); } } else { DebugLog.Log(false, "Invalid Equipment Menu"); return; } }
private void OnEnable() { FrameItemInfo.SetActive(false); FrameNoneItem.SetActive(false); if (InventoryVC.Inst.selectedMenu == Inventory_Menu_Type.ITEM) { selectedMenu = InventoryVC.Inst.selectedMenu; setData(); if (ItemList.Count > 0) { FrameItemInfo.SetActive(true); if (is_init_scroll) { scrollList.SetItemOrder(getOrder()); } else { is_init_scroll = true; initScrollList(); } textOwned.text = string.Format("{0}", ItemList.Count); textTotal.text = string.Format("/ {0}", UserDataManager.Inst.GetUserInventoryInfo().itemInventory); if (ItemList.Count >= UserDataManager.Inst.GetUserInventoryInfo().itemInventory) { textOwned.color = Color.red; } else { textOwned.color = Color.white; } updateItemDetailInfo(scrollList.getFirstItemOrder()); } else { FrameNoneItem.SetActive(true); textNoneItem.text = string.Format("None ITEM"); } } else { DebugLog.Log(false, "Invalid Item Menu"); return; } }
//좌측 메뉴버튼 클릭 public void OnClickMenuButton(int tag) { if (tag == (int)Inventory_Menu_Type.WEAPON) { selectedMenu = Inventory_Menu_Type.WEAPON; } else if (tag == (int)Inventory_Menu_Type.ARMOR) { selectedMenu = Inventory_Menu_Type.ARMOR; } else if (tag == (int)Inventory_Menu_Type.ACCESSORY) { selectedMenu = Inventory_Menu_Type.ACCESSORY; } else { selectedMenu = Inventory_Menu_Type.ITEM; } updateAllView(); }