28 lines
668 B
C#
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);
|
|
}
|
|
}
|
|
}
|