getInverseAngleFromPlayer method

double getInverseAngleFromPlayer()

Get angle between enemy and player enemy position as a base

Implementation

double getInverseAngleFromPlayer() {
  Player? player = gameRef.player;
  if (player == null) return 0.0;
  return BonfireUtil.angleBetweenPoints(
    playerRect.center.toVector2(),
    rectCollision.centerVector2,
  );
}