public void AttemptBuyFoodPellets() { PlayerInventory playerInventory = PlayerInventory.instance; if (playerInventory.GetMoney() < foodPelletsPrice) { return; // Cancels purchase because too poor } playerInventory.AddFoodPellet(); playerInventory.SubtractMoney(foodPelletsPrice); if (purchaseGoodSFX) { purchaseGoodSFX.Play(); } dispenserAnimator.SetTrigger("Crank"); StopAllCoroutines(); StartCoroutine(DispenserRumbling()); StartCoroutine(AnimateDroppingFoodPellets()); }