Enum Class MapObjectType

java.lang.Object
java.lang.Enum<MapObjectType>
de.gurkenlabs.litiengine.environment.tilemap.MapObjectType
All Implemented Interfaces:
Serializable, Comparable<MapObjectType>, Constable

public enum MapObjectType extends Enum<MapObjectType>
Enumerates the built-in map object types LITIengine recognizes when loading .tmx maps. Each value matches the type attribute used by the engine's map object loaders to instantiate the matching engine entity.
  • Enum Constant Details

    • AREA

      public static final MapObjectType AREA
      A generic area without a dedicated entity representation.
    • COLLISIONBOX

      public static final MapObjectType COLLISIONBOX
      A static collision rectangle.
    • EMITTER

      public static final MapObjectType EMITTER
      A particle emitter.
    • LIGHTSOURCE

      public static final MapObjectType LIGHTSOURCE
      A dynamic light source.
    • PROP

      public static final MapObjectType PROP
      A prop entity.
    • CREATURE

      public static final MapObjectType CREATURE
      A creature entity.
    • SOUNDSOURCE

      public static final MapObjectType SOUNDSOURCE
      A point/area emitting a sound.
    • SPAWNPOINT

      public static final MapObjectType SPAWNPOINT
      A spawn point for dynamically spawned entities.
    • TRIGGER

      public static final MapObjectType TRIGGER
      A trigger that fires messages when activated.
    • STATICSHADOW

      public static final MapObjectType STATICSHADOW
      A static (baked) shadow.
  • Field Details

    • UNDEFINED_MAPOBJECTTYPE

      public static final String UNDEFINED_MAPOBJECTTYPE
      Sentinel value used to identify IMapObject instances without an explicit type attribute.
      See Also:
  • Method Details

    • values

      public static MapObjectType[] 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 MapObjectType 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
    • fromOrdinal

      public static MapObjectType fromOrdinal(int n)
      Returns the enum value at the given ordinal.
      Parameters:
      n - the ordinal
      Returns:
      the matching enum value
    • get

      public static MapObjectType get(String mapObjectType)
      Returns the enum value matching the supplied name, or null if the name is blank or does not match any known value.
      Parameters:
      mapObjectType - the type name
      Returns:
      the matching enum value, or null