Class MapObject

java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
de.gurkenlabs.litiengine.environment.tilemap.xml.MapObject
All Implemented Interfaces:
ICustomPropertyProvider, IMapObject, Resource, Comparable<Resource>
Direct Known Subclasses:
Blueprint

public class MapObject extends CustomPropertyProvider implements IMapObject
  • Constructor Details

    • MapObject

      public MapObject()
      Instantiates a new MapObject instance.
    • MapObject

      public MapObject(String type)
      Instantiates a new MapObject instance.
      Parameters:
      type - The type of this map object.
    • MapObject

      public MapObject(MapObject original)
      Instantiates a new MapObject instance by copying the specified original instance.

      This variant of the constructor will assign an entirely new ID to the newly created MapObject.

      Parameters:
      original - the MapObject we want to copy
    • MapObject

      public MapObject(MapObject original, boolean keepID)
      Instantiates a new MapObject instance by copying the specified original instance.

      This variant of the constructor lets you decide if the copy instance will get the same ID as the old MapObject or get a new ID.

      Parameters:
      original - the MapObject we want to copy
      keepID - decide if the new instance will adopt the old MapObject's ID or get a new, unique one.
    • MapObject

      public MapObject(MapObject original, int id)
      Instantiates a new MapObject instance by copying the specified original instance.
      Parameters:
      original - the MapObject we want to copy
      id - The id of this instance.
  • Method Details