public void BuySeed(ShopSeedData seedData) { if (this.m_moneyController.UseResource(seedData.BuyValue)) { PlayerController.Instance.PlayerInventory.AddSeed(new Seed(seedData)); } }
public void ShowBuySeedRow(ShopSeedData data) { this.m_image.color = data.Color; this.m_seedName.text = data.Name; this.m_costText.text = $"{data.BuyValue:0.00}"; this.m_buyButton.onClick.AddListener(() => { Shop.Instance.BuySeed(data); }); }
public Seed(ShopSeedData seedData) { this.Color = seedData.Color; this.SellValue = 1f; this.Name = seedData.Name; }