protected override ItemBubbleUI[] GetItemBubbles() { var itemBubbles = new ItemBubbleUI[_player.Inventory.InventoryCount]; for (int i = 0; i < itemBubbles.Length; i++) { var itemBubble = Instantiate(_itemBubblePrefab); itemBubble.transform.SetParent(_layoutGroup.transform, false); itemBubble.Index = i; itemBubbles[i] = itemBubble; } return(itemBubbles); }
protected override ItemBubbleUI[] GetItemBubbles() { var itemBubbles = new ItemBubbleUI[CRAFTING_SLOTS + NUM_OF_CUSTOM_SLOTS]; itemBubbles[CRAFTED_SLOT_INDEX] = _craftedSlot; _craftedSlot.Index = CRAFTED_SLOT_INDEX; for (int i = 0; i < CRAFTING_SLOTS; i++) { var itemBubble = Instantiate(_itemBubblePrefab); itemBubble.transform.SetParent(_craftingSlotLayoutGroup.transform, false); itemBubble.Index = i + NUM_OF_CUSTOM_SLOTS; itemBubbles[i + NUM_OF_CUSTOM_SLOTS] = itemBubble; } return(itemBubbles); }
protected override ItemBubbleUI[] GetItemBubbles() { var itemBubbles = new ItemBubbleUI[_player.QuickslotInventory.InventoryCount]; _topItem.Index = _player.QuickslotInventory.ConvertQuickSlotIDToIndex(QuickSlotInventory.ID.Top); _rightItem.Index = _player.QuickslotInventory.ConvertQuickSlotIDToIndex(QuickSlotInventory.ID.Right); _bottomItem.Index = _player.QuickslotInventory.ConvertQuickSlotIDToIndex(QuickSlotInventory.ID.Bottom); _leftItem.Index = _player.QuickslotInventory.ConvertQuickSlotIDToIndex(QuickSlotInventory.ID.Left); _centerItem.Index = _player.QuickslotInventory.ConvertQuickSlotIDToIndex(QuickSlotInventory.ID.Center); itemBubbles[_topItem.Index] = _topItem; itemBubbles[_rightItem.Index] = _rightItem; itemBubbles[_bottomItem.Index] = _bottomItem; itemBubbles[_leftItem.Index] = _leftItem; itemBubbles[_centerItem.Index] = _centerItem; return(itemBubbles); }