diff --git a/Assets/Scripts/Actions/Eat.cs b/Assets/Scripts/Actions/Eat.cs index 5d3fe4dc..ae8a7015 100644 --- a/Assets/Scripts/Actions/Eat.cs +++ b/Assets/Scripts/Actions/Eat.cs @@ -1,18 +1,22 @@ -namespace Assets.Scripts.Actions +using Assets.Scripts.Actions.Interfaces; + +namespace Assets.Scripts.Actions { public class Eat : BaseAction, ISellableItem { - private double _price; + public double Price { get; private set; } private int _energyPerTick; public Eat(int duration, int energyPerTick, double price) : base(duration) { - _price = price; + Price = price; _energyPerTick = energyPerTick; } + + + public override void ApplyAction(PlayerController playerController) { playerController.foodEnergy.increase(_energyPerTick); - playerController.money.deduct(_price); } } }