public void RefreshRenderedItems() { List <Item> Items = PlayerInventory.GetItems(); ItemUIControl.Lines.Clear(); if (CurrentPanel == Panels.Category) { CurrentCategory = (Item.ItemTag)VerticalIndex; } for (int x = 0; x < Items.Count; x++) { if (CurrentCategory == Items[x].Category) { PlayerUIControlLine Item = Instantiate(LinePrefab); Item.Icon = Items[x].UIItemImage; Item.Text.text = Items[x].Label; ItemUIControl.Lines.Add(Item); } } }
public void Add(PlayerUIControlLine Item) { Item.transform.SetParent(ItemsParent, false); List.Add(Item); }