Files
SimUL/Assets/Scripts/Actions/Eat.cs
T

28 lines
674 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.PlayerStats[StatsId.Food].increase(_energy);
}
}
}