namespace Assets.Scripts.Actions { public class Eat : BaseAction { private double _price; private int _energyPerTick; public Eat(int duration, int energyPerTick, double price) : base(duration) { _price = price; _energyPerTick = energyPerTick; } public override void ApplyAction(PlayerController playerController) { playerController.foodEnergy.increase(_energyPerTick); playerController.money.deduct(_price); } } }