20 lines
563 B
C#
20 lines
563 B
C#
using Assets.Scripts.Actions.Interfaces;
|
|
|
|
namespace Assets.Scripts.Actions
|
|
{
|
|
public class Eat : BaseAction, ISellableItem
|
|
{
|
|
public double Cost { get; private set; }
|
|
private int energyPerTick;
|
|
public Eat(int duration, int energyPerTick, double cost) : base(duration)
|
|
{
|
|
Cost = cost;
|
|
this.energyPerTick = energyPerTick;
|
|
}
|
|
public override void ApplyAction(PlayerController playerController)
|
|
{
|
|
playerController.foodEnergy.increase(energyPerTick);
|
|
}
|
|
}
|
|
}
|