Files
SimUL/Assets/Scripts/Actions/Eat.cs
T
2022-11-17 16:12:51 +02:00

22 lines
586 B
C#

using Assets.Scripts.Actions.Interfaces;
namespace Assets.Scripts.Actions
{
public class Eat : BaseAction, ISellableItem
{
public float Price { get; private set; }
private int _energyPerTick;
public Eat(int duration, int energyPerTick, float price) : base(duration)
{
Price = price;
_energyPerTick = energyPerTick;
}
public override void ApplyAction(PlayerController playerController)
{
playerController.foodEnergy.increase(_energyPerTick);
}
}
}