void callForPurchase() { OnObjectPurchase?.Invoke(currentBuyObject); OnObjectSatisfaction?.Invoke(currentBuyObject.SatisfactionGain); PlayerEconomy.createPurchase(currentBuyObject.BuyName, -currentBuyObject.BuyValue); currentBuyObject = null; }
public virtual void PrepareFood() { if (PlayerDataHolder.Current.PlayerMoney.getValue <float>() >= cost) { PlayerDataHolder.Current.Foodamount.ChangeStat(increaseAmount); PlayerEconomy.createPurchase("Ruokakauppareissut", -cost, true); } else { MainCanvas.mainCanvas.createEconomyWarning(); } }