Files
SimUL/Assets/Scripts/Actions/Eat.cs
T
Vladimir Koshevarov c6e463e795 partial fix sun system
2022-12-12 16:50:26 +02:00

28 lines
693 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(PlayerManager playerController)
{
playerController.PlayerStats[GameManager.StatsId.Food].increase(_energy);
}
}
}