Record Class CONSTANTS

java.lang.Object
java.lang.Record
de.tum.cit.ase.maze.utils.CONSTANTS

public record CONSTANTS() extends Record
Saves constants
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final short
    Filter bit for Collectable
    static final boolean
    Tells if the game is in development mode.
    static final short
    Filter bit default
    static final short
    Filter bit for Enemy
    static final short
    Filter bit IGNORE
    static final short
    Filter bit for Box2dLights
    static final short
    Filter bit for Player
    static final int
    The maximal health a player has.
    static final float
    Scale factor to convert Box2d meter to pixel.
    static final float
     
    static final short
    Filter bit for Box2d sensor
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of a CONSTANTS record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • PPM

      public static final float PPM
      Scale factor to convert Box2d meter to pixel. Getting Box2D units: Multiply by PPM. Giving to Box2D units: divide by PPM.

      e.g. getting position multiply. setting position divide.

      See Also:
    • PLAYER_MAX_HEALTH

      public static final int PLAYER_MAX_HEALTH
      The maximal health a player has.
      See Also:
    • DEBUG

      public static final boolean DEBUG
      Tells if the game is in development mode.
      See Also:
    • SCALE

      public static final float SCALE
      See Also:
    • DEFAULT_BIT

      public static final short DEFAULT_BIT
      Filter bit default
      See Also:
    • SENSOR_BIT

      public static final short SENSOR_BIT
      Filter bit for Box2d sensor
      See Also:
    • LIGHT_BIT

      public static final short LIGHT_BIT
      Filter bit for Box2dLights
      See Also:
    • PLAYER_BIT

      public static final short PLAYER_BIT
      Filter bit for Player
      See Also:
    • ENEMY_BIT

      public static final short ENEMY_BIT
      Filter bit for Enemy
      See Also:
    • COLLECTABLE_BIT

      public static final short COLLECTABLE_BIT
      Filter bit for Collectable
      See Also:
    • IGNORE_GROUP_BIT

      public static final short IGNORE_GROUP_BIT
      Filter bit IGNORE
      See Also:
  • Constructor Details

    • CONSTANTS

      public CONSTANTS()
      Creates an instance of a CONSTANTS record class.
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.