Files
SimUL/Assets/Scripts/Actions/Eat.cs
T
Vladimir Koshevarov b71fa6a9eb Refactor code
2023-02-28 16:19:40 +02:00

28 lines
668 B
C#

using Assets.Scripts.Actions.Interfaces;
namespace Assets.Scripts.Actions
{
public class Eat : IPlayerAction, ISellable
{
public decimal Price { get; private set; }
public string Name { get; private set; }
public string Description => $"{Name} - {Price}$";
private int _energy;
public Eat(string name, int energy, decimal price)
{
Name = name;
Price = price;
_energy = energy;
}
public void ApplyAction(Player playerController)
{
playerController.Stats[StatsId.Food].increase(_energy);
}
}
}