Files
SimUL/Assets/Scripts/Actions/Eat.cs
T
Vladimir Koshevarov fc8393b29f added Game UI Controller
Show money on UI, buy items
2022-10-18 16:55:38 +03:00

19 lines
541 B
C#

namespace Assets.Scripts.Actions
{
public class Eat : BaseAction
{
private double _price;
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);
playerController.money.deduct(_price);
}
}
}