start to change action system

This commit is contained in:
Vladimir Koshevarov
2022-08-18 16:07:06 +03:00
parent a9e1db4ac2
commit 9366aa479c
11 changed files with 31 additions and 49 deletions
+3 -5
View File
@@ -2,16 +2,14 @@
{
public class Relax : BaseAction
{
private PlayerController _playerController;
private int _energyPerTick;
public Relax(PlayerController player, int duration, int energyPerTick) : base(duration)
public Relax(int duration, int energyPerTick) : base(duration)
{
_playerController = player;
_energyPerTick = energyPerTick;
}
public override void ConsumeTick()
public override void ApplyAction(PlayerController playerController)
{
_playerController.restEnergy.increase(_energyPerTick);
playerController.restEnergy.increase(_energyPerTick);
}
}
}