public void OnInventoryClick(object[] arr) { InventoryItem item = arr[0] as InventoryItem; bool isLeft = (bool)arr[1]; InventoryItemUI itemUI = null; KnapsackRoleEquip roleEquip = null; if (isLeft) { itemUI = arr[2] as InventoryItemUI; } else { roleEquip = arr[2] as KnapsackRoleEquip; } if (item.Inventory.InventoryType == InventoryType.Equip) { equipPopup.SetEquipPopup(arr[0] as InventoryItem, itemUI, roleEquip, isLeft); } else { InventoryItemUI itemUIdrug = arr[2] as InventoryItemUI; inventoryPopup.SetInventoryPopup(arr[0] as InventoryItem, itemUIdrug); } }