public void SetItemViews(List <ItemRef> items, EquippedDelegate isEquippedCallback) { itemViews.Clear(); int maxIndex = Mathf.Min(items.Count, itemViews.GetCount()); for (int index = 0; index < maxIndex; ++index) { itemViews.SetItem(index, items[index], isEquippedCallback(items[index].ReferencedItem)); } }
public void SetItemViews(List <ItemRef> items, EquippedDelegate isEquippedCallback) { itemViews.Clear(); int maxIndex = Mathf.Min(items.Count, itemViews.GetCount()); for (int index = 0; index < maxIndex; ++index) { itemViews.SetItem(index, items[index], isEquippedCallback(items[index].ReferencedItem)); ItemAmountView amountView = itemViews.ItemViews[index].GetComponent <ItemAmountView>(); if (amountView != null) { amountView.Clear(); } } }