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 IMapObjectLoaderConstructor Summary
Constructors Modifier Constructor Description protectedMapObjectLoader(MapObjectType mapObjectType)protectedMapObjectLoader(java.lang.String mapObjectType)Method Summary
Modifier and Type Method Description voidafterLoad(java.util.Collection<IEntity> entities, IMapObject mapObject)This method is called externally on the loader instance after the entities have been loaded.java.lang.StringgetMapObjectType()protected booleanisMatchingType(IMapObject mapObject)static voidloadDefaultProperties(IEntity entity, IMapObject mapObject)Loads engine default properties to the specifiedIEntityinstance: 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:
getMapObjectTypein interfaceIMapObjectLoader
loadDefaultProperties
Loads engine default properties to the specifiedIEntityinstance:- 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:IMapObjectLoaderThis method is called externally on the loader instance after the entities have been loaded.- Specified by:
afterLoadin interfaceIMapObjectLoader- Parameters:
entities- The loaded entities.mapObject- The map object by which the entities have been loaded.
isMatchingType
