public void HandleSelected() { ContainerItemsGUI gui = (ContainerItemsGUI)Instantiate(this.guiPrefab, this.guiPrefab.transform.position, this.guiPrefab.transform.rotation); gui.type = ItemSlotTypeConstants.ITEM_INVENTORY; List <ItemModel> inventoryItems = this.gameState.player.GetInventoryItems(); if (inventoryItems.Count != 0) { gui.SetItems(inventoryItems); } }
public override void HandleInteraction() { if (this.itemContainer != null) { Debug.Log("Item Container: " + this.itemContainer.label); ContainerItemsGUI gui = (ContainerItemsGUI)Instantiate(this.guiPrefab, this.guiPrefab.transform.position, this.guiPrefab.transform.rotation); gui.type = ItemSlotTypeConstants.ITEM_CONTAINER; gui.SetItemsFromContainer(this.itemContainer); } else { Debug.LogWarning("Container Prop has no Item Container model."); } }