public static void RegisterPurchasableLandPlot(LandPlotShopEntry entry) { PurchasableUIRegistry.RegisterPurchasable <EmptyPlotUI>((x) => { return(new PurchaseUI.Purchasable(entry.NameKey, entry.icon, entry.mainImg, entry.DescKey, entry.cost, entry.pediaId, () => x.BuyPlot(new LandPlotUI.PlotPurchaseItem() { icon = entry.icon, img = entry.mainImg, cost = entry.cost, plotPrefab = GameContext.Instance.LookupDirector.GetPlotPrefab(entry.plot) }), entry.isUnlocked ?? (() => true), () => true)); }); }
public static void RegisterPurchasableLandPlot(LandPlotShopEntry entry) { PurchasableUIRegistry.RegisterPurchasable <EmptyPlotUI>(x => new PurchaseUI.Purchasable(entry.NameKey, entry.icon, entry.mainImg, entry.DescKey, entry.cost, entry.pediaId, () => { EmptyPlotUI emptyPlotUi = x; emptyPlotUi.BuyPlot(new LandPlotUI.PlotPurchaseItem() { icon = entry.icon, img = entry.mainImg, cost = entry.cost, plotPrefab = SRSingleton <GameContext> .Instance.LookupDirector.GetPlotPrefab(entry.plot) }); }, entry.isUnlocked ?? (() => true), (() => true), null, null, null, null)); }