예제 #1
0
    private void RemoveUIItem(ProductType p)
    {
        NiceListUIItem item = spawnedNiceListUI.Find(i => i.Product == p);

        spawnedNiceListUI.Remove(item);
        if (item != null)
        {
            item.CompleteItem();
        }
    }
예제 #2
0
    private void SpawnUIForList()
    {
        int count = 0;

        foreach (ProductType p in currentProductsInList)
        {
            NiceListUIItem item = Instantiate(uiItemPrefab, niceListUIParent);
            item.Initialise(p, count);
            spawnedNiceListUI.Add(item);
            count++;
        }
    }