public void onInventoryClick(object[] objArray) { InventoryItem it = objArray[0] as InventoryItem; bool isLeft = (bool)objArray[1]; if (it.Inventory.InventoryType == InventoryType.Equip) { inventoryPopup.onClose(); if (isLeft == false) { itUI = objArray[2] as InventoryItemUI; enableSellBtn(); sellPriceTxt.text = (itUI.it.Inventory.Price * itUI.it.Count).ToString(); } equipPopup.Show(it, itUI, isLeft); } else { itUI = objArray[2] as InventoryItemUI; equipPopup.onClose(); inventoryPopup.Show(it, itUI); enableSellBtn(); sellPriceTxt.text = (itUI.it.Inventory.Price * itUI.it.Count).ToString(); } }