Annotation Interface CollisionInfo


@Target(TYPE) @Retention(RUNTIME) @Inherited public @interface CollisionInfo
The CollisionInfo annotation provides metadata for collision properties of an entity. It can be applied to types (classes or interfaces) and is inherited by subclasses.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    boolean
    Specifies whether the entity has collision enabled.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specifies the horizontal alignment of the entity's collision box.
    float
    Specifies the height of the entity's collision box.
    float
    Specifies the width of the entity's collision box.
    Specifies the type of collision for the entity.
    Specifies the vertical alignment of the entity's collision box.
  • Element Details

    • align

      Align align
      Specifies the horizontal alignment of the entity's collision box. Defaults to Align.CENTER.
      Returns:
      the horizontal alignment of the collision box
      Default:
      CENTER
    • collision

      boolean collision
      Specifies whether the entity has collision enabled.
      Returns:
      true if collision is enabled, false otherwise
    • collisionBoxHeight

      float collisionBoxHeight
      Specifies the height of the entity's collision box. Defaults to 0.
      Returns:
      the height of the collision box
      Default:
      -1.0f
    • collisionBoxWidth

      float collisionBoxWidth
      Specifies the width of the entity's collision box. Defaults to 0.
      Returns:
      the width of the collision box
      Default:
      -1.0f
    • valign

      Valign valign
      Specifies the vertical alignment of the entity's collision box. Defaults to Valign.DOWN.
      Returns:
      the vertical alignment of the collision box
      Default:
      DOWN
    • collisionType

      Collision collisionType
      Specifies the type of collision for the entity. Defaults to Collision.DYNAMIC.
      Returns:
      the type of collision
      Default:
      DYNAMIC