public void Execute(BattlefieldVision vision, MyHexPosition activatingPosition, BattleEngagementResult reciever) { var unitInFront = vision.GetUnitAt(new MyHexPosition(1, 0)); Assert.IsTrue(unitInFront != null && unitInFront.Owner != vision.PossesedPawn.Owner, "There is no enemy unit in front of me"); reciever.DisplaceUnit(unitInFront, vision.ToGlobalPosition(new MyHexPosition(2, 0))); }
public void Execute(BattlefieldVision vision, MyHexPosition activatingPosition, BattleEngagementResult reciever) { var grabbedUnit = RetriveGrabbedUnit(vision); Assert.IsNotNull(grabbedUnit, "There is no target"); reciever.DisplaceUnit(grabbedUnit, vision.ToGlobalPosition(new MyHexPosition(DistanceAfterGrab, 0))); }