private void modificarItemShop(ItemLoja item, bool lojaAberta, string estabelecimentoId) { ItemObj objItemShop = lstItensLoja.Find(x => x.ItemLoja._id == item._id); if (objItemShop != null) { objItemShop.PreencherInfo(item, lojaAberta, estabelecimentoId); } }
private void adicionarItemShop(ItemLoja item, bool lojaAberta, string estabelecimentoId) { if (item._id != null) { ItemObj objItemShop = Instantiate(ItemShopRef, ScvShop.transform); Main.Instance.ObterIcones(item.icon, FileManager.Directories.item_loja, (textura) => { if (textura != null) { objItemShop.PreencherIcone(textura); } }); objItemShop.PreencherInfo(item, lojaAberta, estabelecimentoId); lstItensLoja.Add(objItemShop); PnlShopVazio.SetActive(false); } }