From d25171c8332f66bff9ed333d53424e702e09bac0 Mon Sep 17 00:00:00 2001 From: Vladimir Koshevarov Date: Tue, 18 Oct 2022 17:02:48 +0300 Subject: [PATCH] Fix merge --- Assets/Scripts/Actions/Eat.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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); } } }