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

        spawnedNiceListUI.Remove(item);
        if (item != null)
        {
            item.CompleteItem();
        }
    }
Exemple #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++;
        }
    }