23 lines
568 B
C#
23 lines
568 B
C#
using Assets.Scripts.Actions.Interfaces;
|
|
|
|
namespace Assets.Scripts.Actions
|
|
{
|
|
public class Eat : BaseAction, ISellableItem
|
|
{
|
|
public double Price { get; private set; }
|
|
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);
|
|
}
|
|
}
|
|
}
|