Fix merge
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user