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 java.lang.Object
implements IMapObjectLoader
Constructor Summary
Constructors Modifier Constructor Description protected
MapObjectLoader(MapObjectType mapObjectType)
protected
MapObjectLoader(java.lang.String mapObjectType)
Method Summary
Modifier and Type Method Description void
afterLoad(java.util.Collection<IEntity> entities, IMapObject mapObject)
This method is called externally on the loader instance after the entities have been loaded.java.lang.String
getMapObjectType()
protected boolean
isMatchingType(IMapObject mapObject)
static void
loadDefaultProperties(IEntity entity, IMapObject mapObject)
Loads engine default properties to the specifiedIEntity
instance: width, height mapId name location tags Also, this supports predefinedCustomMapObjectProperties
.
Constructor Details
MapObjectLoader
protected MapObjectLoader(java.lang.String mapObjectType)MapObjectLoader
Method Details
getMapObjectType
public java.lang.String getMapObjectType()- Specified by:
getMapObjectType
in interfaceIMapObjectLoader
loadDefaultProperties
Loads engine default properties to the specifiedIEntity
instance:- width, height
- mapId
- name
- location
- tags
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:
TmxProperty
afterLoad
Description copied from interface:IMapObjectLoader
This method is called externally on the loader instance after the entities have been loaded.- Specified by:
afterLoad
in interfaceIMapObjectLoader
- Parameters:
entities
- The loaded entities.mapObject
- The map object by which the entities have been loaded.
isMatchingType