Enum Class EntityPivotType

java.lang.Object
java.lang.Enum<EntityPivotType>
de.gurkenlabs.litiengine.entities.EntityPivotType
All Implemented Interfaces:
Serializable, Comparable<EntityPivotType>, Constable

public enum EntityPivotType extends Enum<EntityPivotType>
The EntityPivotType enum defines the types of pivot points that can be used for entities within the game. A pivot point determines the reference point for positioning and rotating entities.
  • Enum Constant Details

    • COLLISIONBOX_CENTER

      public static final EntityPivotType COLLISIONBOX_CENTER
      Represents the center of the entity's collision box. This pivot type is useful for entities where interactions or collisions are centered around the entity's collision box rather than its entity dimensions.
    • DIMENSION_CENTER

      public static final EntityPivotType DIMENSION_CENTER
      Represents the center of the entity's dimensions. This is commonly used for graphical alignment, ensuring that rotations or scaling operations are centered on the visual representation of the entity.
    • LOCATION

      public static final EntityPivotType LOCATION
      Represents the entity's current location, defined as its top left corner. This pivot type is typically used for simple positioning where the reference object has the same dimensions as the reference entity.
    • SPREAD

      public static final EntityPivotType SPREAD
      Represents a distribution or spread of entities or effects over the entire bounding box of the reference entity. This pivot type can be used for scenarios where an entity's effect or presence needs to be distributed across an area, rather than focused on a single point. For example, it could be used for area-of-effect spells, explosions, or spreading Props or Creatures in a game environment.
  • Method Details

    • values

      public static EntityPivotType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static EntityPivotType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null