Class CustomMapObjectLoader
java.lang.Object
de.gurkenlabs.litiengine.environment.MapObjectLoader
de.gurkenlabs.litiengine.environment.CustomMapObjectLoader
- All Implemented Interfaces:
IMapObjectLoader
The CustomMapObjectLoader class extends the MapObjectLoader class to provide custom functionality for loading map objects into
entities.
This class uses a functional interface ConstructorInvocation to dynamically
invoke constructors of entity classes based on the provided IMapObject and Environment. It supports various constructor signatures
and prioritizes them based on their parameter types.
It also overrides the load method to handle the creation and initialization
of entities from map objects.
-
Method Summary
Modifier and TypeMethodDescriptionload(Environment environment, IMapObject mapObject) Loads entities from the specified map object within the given environment.Methods inherited from class MapObjectLoader
afterLoad, getMapObjectType, isMatchingType, loadDefaultProperties
-
Method Details
-
load
Description copied from interface:IMapObjectLoaderLoads entities from the specified map object within the given environment.- Parameters:
environment- The environment in which the entities are being loaded.mapObject- The map object containing the data for the entities.- Returns:
- A collection of
IEntityinstances loaded from the map object.
-