|
|
|
@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
using Babushka.scripts.CSharp.Common.Util;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Babushka.scripts.CSharp.Common.Fight.Actions;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class BlobAttackAction : FighterAction
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
public override Variant<float, Func<bool>> GetAnimationEnd()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override bool NextDetail()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override void ExecuteAction()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
FightWorld.Instance.allyFighters.vesnaFighter.AddHealth(-3);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override async Task AnimateAction(AllFightersVisual allFightersVisual)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var currentFighter = HappeningData.fighterStack.Current;
|
|
|
|
|
|
|
|
var targetFighter = FightWorld.Instance.allyFighters.vesnaFighter;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var currentFighterVisual = allFightersVisual.GetVisualForFighter(currentFighter);
|
|
|
|
|
|
|
|
var targetFighterVisual = allFightersVisual.GetVisualForFighter(targetFighter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await currentFighterVisual.AnimatePosToTarget(targetFighterVisual);
|
|
|
|
|
|
|
|
_ = targetFighterVisual.AnimateHit();
|
|
|
|
|
|
|
|
await currentFighterVisual.AnimatePosToBase();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|