18 lines
519 B
C#
18 lines
519 B
C#
namespace Assets.Scripts.Actions
|
|
{
|
|
public class Eat : BaseAction
|
|
{
|
|
private PlayerController playerController;
|
|
private int energyPerTick;
|
|
public Eat(PlayerController player, int duration, int energyPerTick, double cost) : base(duration)
|
|
{
|
|
this.playerController = player;
|
|
this.energyPerTick = energyPerTick;
|
|
}
|
|
public override void ConsumeTick()
|
|
{
|
|
playerController.foodEnergy.increase(energyPerTick);
|
|
}
|
|
}
|
|
}
|