getDirectionToTarget method

Direction getDirectionToTarget(
  1. GameComponent target, {
  2. bool withDiagonal = true,
})

Implementation

Direction getDirectionToTarget(
  GameComponent target, {
  bool withDiagonal = true,
}) {
  return BonfireUtil.getDirectionFromAngle(
    getAngleToTarget(target),
    directionSpace: withDiagonal ? 2.5 : 45,
  );
}