Fix merge

This commit is contained in:
Vladimir Koshevarov
2022-10-18 17:02:48 +03:00
parent c3823d3de5
commit d25171c833
+8 -4
View File
@@ -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);
}
}
}