src/neon/rendering/HitboxAligner.java
/**
   * Aligns the hitbox to the specified alignment.
   *
   * @param hitbox the hitbox
   * @param alignment the alignment
   */
Aligns the hitbox to the specified alignment.
@param hitbox the hitbox
@param alignment the alignment
Aligns the hitbox to the specified alignment . @param hitbox the hitbox @param alignment the alignment
public static void align(Hitbox hitbox, HitboxAlignment alignment) {
    switch (alignment) {
      case TOP -> alignTop(hitbox);
      case BOTTOM -> alignBottom(hitbox);
      case LEFT -> alignLeft(hitbox);
      case RIGHT -> alignRight(hitbox);
      case TOP_LEFT -> {
        alignTop(hitbox);
        alignLeft(hitbox);
      }
      case TOP_RIGHT -> {
        alignTop(hitbox);
        alignRight(hitbox);
      }
      case BOTTOM_LEFT -> {
        alignBottom(hitbox);
        alignLeft(hitbox);
      }
      case BOTTOM_RIGHT -> {
        alignBottom(hitbox);
        alignRight(hitbox);
      }
    }
  }
public static void align ( Hitbox hitbox , HitboxAlignment alignment ) { switch ( alignment ) { case TOP -> alignTop ( hitbox ) ; case BOTTOM -> alignBottom ( hitbox ) ; case LEFT -> alignLeft ( hitbox ) ; case RIGHT -> alignRight ( hitbox ) ; case TOP_LEFT -> { alignTop ( hitbox ) ; alignLeft ( hitbox ) ; } case TOP_RIGHT -> { alignTop ( hitbox ) ; alignRight ( hitbox ) ; } case BOTTOM_LEFT -> { alignBottom ( hitbox ) ; alignLeft ( hitbox ) ; } case BOTTOM_RIGHT -> { alignBottom ( hitbox ) ; alignRight ( hitbox ) ; } } }
Aligns the hitbox to the specified alignment.
Aligns the hitbox to the specified alignment .