Annotation 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 ElementsModifier and TypeRequired ElementDescriptionbooleanSpecifies whether the entity has collision enabled. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionSpecifies the horizontal alignment of the entity's collision box.floatSpecifies the height of the entity's collision box.floatSpecifies 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 alignSpecifies the horizontal alignment of the entity's collision box. Defaults toAlign.CENTER.- Returns:
- the horizontal alignment of the collision box
- Default:
CENTER
-
collision
boolean collisionSpecifies whether the entity has collision enabled.- Returns:
- true if collision is enabled, false otherwise
-
collisionBoxHeight
float collisionBoxHeightSpecifies the height of the entity's collision box. Defaults to 0.- Returns:
- the height of the collision box
- Default:
-1.0f
-
collisionBoxWidth
float collisionBoxWidthSpecifies the width of the entity's collision box. Defaults to 0.- Returns:
- the width of the collision box
- Default:
-1.0f
-
valign
Valign valignSpecifies the vertical alignment of the entity's collision box. Defaults toValign.DOWN.- Returns:
- the vertical alignment of the collision box
- Default:
DOWN
-
collisionType
Collision collisionTypeSpecifies the type of collision for the entity. Defaults toCollision.DYNAMIC.- Returns:
- the type of collision
- Default:
DYNAMIC
-