Fix shop System

add food indicator
This commit is contained in:
Vladimir Koshevarov
2022-11-17 17:24:00 +02:00
parent be3161d7e4
commit c8047bd170
16 changed files with 663 additions and 286 deletions
+5 -5
View File
@@ -5,17 +5,17 @@ namespace Assets.Scripts.Actions
public class Eat : BaseAction, ISellableItem
{
public float Price { get; private set; }
private int _energyPerTick;
public Eat(int duration, int energyPerTick, float price) : base(duration)
private int _energy;
public Eat(int duration, int energy, float price) : base(duration)
{
Price = price;
_energyPerTick = energyPerTick;
_energy = energy;
}
public override void ApplyAction(PlayerController playerController)
public override void ApplyAction(PlayerManager playerController)
{
playerController.foodEnergy.increase(_energyPerTick);
playerController.food.increase(_energy);
}
}
}