Class MapObjectLoader

java.lang.Object
de.gurkenlabs.litiengine.environment.MapObjectLoader
All Implemented Interfaces:
IMapObjectLoader
Direct Known Subclasses:
CollisionBoxMapObjectLoader, CreatureMapObjectLoader, CustomMapObjectLoader, EmitterMapObjectLoader, LightSourceMapObjectLoader, MapAreaMapObjectLoader, PropMapObjectLoader, SoundSourceMapObjectLoader, SpawnpointMapObjectLoader, StaticShadowMapObjectLoader, TriggerMapObjectLoader

public abstract class MapObjectLoader extends Object implements IMapObjectLoader
  • Constructor Details

    • MapObjectLoader

      protected MapObjectLoader(String mapObjectType)
    • MapObjectLoader

      protected MapObjectLoader(MapObjectType mapObjectType)
  • Method Details

    • getMapObjectType

      public String getMapObjectType()
      Specified by:
      getMapObjectType in interface IMapObjectLoader
    • loadDefaultProperties

      public static void loadDefaultProperties(IEntity entity, IMapObject mapObject)
      Loads engine default properties to the specified IEntity instance:
      • width, height
      • mapId
      • name
      • location
      • tags
      Also, this supports predefined CustomMapObjectProperties. It loads the specified custom properties via reflection.
      Parameters:
      entity - The entity instance that will be initialized.
      mapObject - The mapObject that provides the static information for the new entity.
      See Also:
    • afterLoad

      public void afterLoad(Collection<IEntity> entities, IMapObject mapObject)
      Description copied from interface: IMapObjectLoader
      This method is called externally on the loader instance after the entities have been loaded.
      Specified by:
      afterLoad in interface IMapObjectLoader
      Parameters:
      entities - The loaded entities.
      mapObject - The map object by which the entities have been loaded.
    • isMatchingType

      protected boolean isMatchingType(IMapObject mapObject)