public MovementPackage GetDestinationFromFirstMove(float distanceScalar, Vector2 moveDirection) { var unit = TargetDetector.GetValidUnitInFrontFromTargetPosition(null, distanceScalar, moveDirection, _transform.position, 0.7f); var destination = EvaluateStartingMove(unit, distanceScalar, moveDirection); if (Vector2.Distance(_transform.position, destination.TargetLocation) < 0.1f) { return(null); } var startingPackage = new MovementPackage(_transform, destination, distanceScalar); return(startingPackage); }
public MovementPlan RequestStartPlan(Vector2 inputDirection, float moveAmount) { var unit = TargetDetector.GetValidUnitInFrontFromTargetPosition(null, moveAmount, inputDirection, _player.transform.position, 0.7f); return(_movementPlanner.GetStartingPlan(inputDirection, unit)); }