Files
SimUL/Assets/Scripts/Actions/Eat.cs
T
2022-08-17 11:14:32 +03:00

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);
}
}
}