show player energy, change daytimecontroller to TimeManager
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ namespace Assets.Scripts.Actions.Interfaces
|
||||
{
|
||||
internal interface ISellableItem
|
||||
{
|
||||
public double Price { get; }
|
||||
public float Price { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
namespace Assets.Scripts.Actions
|
||||
{
|
||||
public class Relax : BaseAction
|
||||
{
|
||||
private int _energyPerTick;
|
||||
public Relax(int duration, int energyPerTick) : base(duration)
|
||||
{
|
||||
_energyPerTick = energyPerTick;
|
||||
}
|
||||
public override void ApplyAction(PlayerController playerController)
|
||||
{
|
||||
playerController.restEnergy.increase(_energyPerTick);
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace Assets.Scripts.Actions
|
||||
{
|
||||
public class Relax : BaseAction
|
||||
{
|
||||
private int _energyPerTick;
|
||||
public Relax(int duration, int energyPerTick) : base(duration)
|
||||
{
|
||||
_energyPerTick = energyPerTick;
|
||||
}
|
||||
public override void ApplyAction(PlayerController playerController)
|
||||
{
|
||||
playerController.energy.increase(_energyPerTick);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user