Exemplo n.º 1
0
        public void UpdateMarketItem(Seed seed, int quantity)
        {
            MarketItem i = this.marketItems.FirstOrDefault(x => x.Seed == seed);

            if (i == null)
            {
                return; //should not happen.
            }
            i.UpdateMarketItem(quantity);
        }
Exemplo n.º 2
0
        public MarketItem GetMarketItem(Seed seed)
        {
            MarketItem i = this.marketItems.FirstOrDefault(x => x.Seed == seed);

            if (i == null)
            {
                return(null); //should not happen.
            }
            return(i);
        }
Exemplo n.º 3
0
 private void Start()
 {
     foreach (Seed seed in SeedManager.SeedManager.instance.SeedCollection.Seed)
     {
         Debug.Log($"Making a market item for {seed.Name}");
         MarketItem i = Instantiate(_marketItem, this._gridLayoutGroup.transform);
         i.InitMarketItem(seed, 100, Convert.ToDecimal(seed.Price_Per_Seed));
         this.marketItems.Add(i);
         //InventoryItem i = Instantiate(_marketItem, this._scrollView.transform, false);
     }
 }