|
|
|
@ -4,11 +4,8 @@ using Babushka.scripts.CSharp.Common.Util;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Babushka.scripts.CSharp.Common.Fight.Actions;
|
|
|
|
namespace Babushka.scripts.CSharp.Common.Fight.Actions;
|
|
|
|
|
|
|
|
|
|
|
|
public class BlobAttackAction : FighterAction
|
|
|
|
public class BlobAttackAction(int damage = 3) : FighterAction
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// settings
|
|
|
|
|
|
|
|
private const int Damage = 3;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override Variant<float, Func<bool>> GetAnimationEnd()
|
|
|
|
public override Variant<float, Func<bool>> GetAnimationEnd()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
@ -21,7 +18,7 @@ public class BlobAttackAction : FighterAction
|
|
|
|
|
|
|
|
|
|
|
|
public override void ExecuteAction()
|
|
|
|
public override void ExecuteAction()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
FightWorld.Instance.allyFighters.vesnaFighter.AddHealth(-Damage);
|
|
|
|
FightWorld.Instance.allyFighters.vesnaFighter.AddHealth(-damage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override async Task AnimateAction(AllFightersVisual allFightersVisual)
|
|
|
|
public override async Task AnimateAction(AllFightersVisual allFightersVisual)
|
|
|
|
@ -34,7 +31,7 @@ public class BlobAttackAction : FighterAction
|
|
|
|
|
|
|
|
|
|
|
|
await currentFighterVisual.AnimatePosToTarget(targetFighterVisual);
|
|
|
|
await currentFighterVisual.AnimatePosToTarget(targetFighterVisual);
|
|
|
|
_ = targetFighterVisual.AnimateHit();
|
|
|
|
_ = targetFighterVisual.AnimateHit();
|
|
|
|
targetFighterVisual.SpawnDamageIndicatorNumber(Damage);
|
|
|
|
targetFighterVisual.SpawnDamageIndicatorNumber(damage);
|
|
|
|
await currentFighterVisual.AnimatePosToBase();
|
|
|
|
await currentFighterVisual.AnimatePosToBase();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|