added tooltips

This commit is contained in:
Vladimir Koshevarov
2022-11-29 19:09:00 +02:00
parent 2167b43c29
commit 73f06d8754
33 changed files with 1264 additions and 250 deletions
+11 -5
View File
@@ -2,20 +2,26 @@
namespace Assets.Scripts.Actions
{
public class Eat : BaseAction, ISellableItem
public class Eat : IPlayerAction, Interfaces.ISellable
{
public float Price { get; private set; }
public decimal Price { get; private set; }
public string Name { get; private set; }
public string Description => $"{Name} - {Price}$";
private int _energy;
public Eat(int duration, int energy, float price) : base(duration)
public Eat(string name, int energy, decimal price)
{
Name = name;
Price = price;
_energy = energy;
}
public override void ApplyAction(PlayerManager playerController)
public void ApplyAction(PlayerManager playerController)
{
playerController.food.increase(_energy);
playerController.PlayerStats[GameManager.StatsId.Food].increase(_energy);
}
}
}