18 lines
506 B
C#
18 lines
506 B
C#
namespace Assets.Scripts.Actions
|
|
{
|
|
public class Relax : BaseAction
|
|
{
|
|
private PlayerController _playerController;
|
|
private int _energyPerTick;
|
|
public Relax(PlayerController player, int duration, int energyPerTick) : base(duration)
|
|
{
|
|
_playerController = player;
|
|
_energyPerTick = energyPerTick;
|
|
}
|
|
public override void ConsumeTick()
|
|
{
|
|
_playerController.restEnergy.increase(_energyPerTick);
|
|
}
|
|
}
|
|
}
|