show player energy, change daytimecontroller to TimeManager

This commit is contained in:
Vladimir Koshevarov
2022-11-17 16:12:51 +02:00
parent 6b8d74932c
commit be3161d7e4
15 changed files with 859 additions and 223 deletions
+21 -22
View File
@@ -1,22 +1,21 @@
using Assets.Scripts.Actions.Interfaces;
namespace Assets.Scripts.Actions
{
public class Eat : BaseAction, ISellableItem
{
public double Price { get; private set; }
private int _energyPerTick;
public Eat(int duration, int energyPerTick, double price) : base(duration)
{
Price = price;
_energyPerTick = energyPerTick;
}
public override void ApplyAction(PlayerController playerController)
{
playerController.foodEnergy.increase(_energyPerTick);
}
}
}
using Assets.Scripts.Actions.Interfaces;
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)
{
Price = price;
_energyPerTick = energyPerTick;
}
public override void ApplyAction(PlayerController playerController)
{
playerController.foodEnergy.increase(_energyPerTick);
}
}
}