Annotation Interface MovementInfo


@Target(TYPE) @Retention(RUNTIME) @Inherited public @interface MovementInfo
This annotation contains movement-related properties for an entity implementation. It can be used to specify default properties such as acceleration, deceleration, whether the entity should turn while moving, and the velocity.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Specifies the default acceleration of the entity.
    int
    Specifies the default deceleration of the entity.
    boolean
    Specifies whether the entity should turn while moving.
    float
    Specifies the default velocity of the entity in pixels per second.
  • Element Details

    • acceleration

      int acceleration
      Specifies the default acceleration of the entity. Defaults to 0.
      Returns:
      the default acceleration of the entity
      Default:
      0
    • deceleration

      int deceleration
      Specifies the default deceleration of the entity. Defaults to 0.
      Returns:
      the default deceleration of the entity
      Default:
      0
    • turnOnMove

      boolean turnOnMove
      Specifies whether the entity should turn while moving. Defaults to true.
      Returns:
      true if the entity should turn while moving, false otherwise
      Default:
      true
    • velocity

      float velocity
      Specifies the default velocity of the entity in pixels per second. Defaults to 100.
      Returns:
      the default velocity of the entity
      Default:
      100.0f