void Start() { // TEMP // Pick random items _activeItems = new List <BaseItem>(); for (int i = 0; i < StartingItems; i++) { GameObject obj = Instantiate(ItemPrefabs[UnityEngine.Random.Range(0, ItemPrefabs.Length)]); BaseItem item = obj.GetComponent <BaseItem>(); _activeItems.Add(item); Debug.Log("adding item: " + item.ItemName); } _itemDisplayUI = Instantiate(ItemUIPrefab).GetComponent <ItemDisplayUI>(); }
private void InitializeDisplay() { itemDisplay = GetComponent <ItemDisplayUI>(); itemDisplay.ItemIndex = currentItemIndex; itemDisplay.Items = Items; }