Interface IMapObjectLoader
- All Known Implementing Classes:
CollisionBoxMapObjectLoader, CreatureMapObjectLoader, CustomMapObjectLoader, EmitterMapObjectLoader, LightSourceMapObjectLoader, MapAreaMapObjectLoader, MapObjectLoader, PropMapObjectLoader, SoundSourceMapObjectLoader, SpawnpointMapObjectLoader, StaticShadowMapObjectLoader, TriggerMapObjectLoader
public interface IMapObjectLoader
This interface provides methods that are required for loading an IEntity from an IMapObject. It separates the actual entity
implementation from the loading process and provide a place to implement all the logic to load attributes and initialize logic based on static
information from the IMap.
The engine provides default implementations for all predefined Entity types (e.g. Prop or Creature). You can inherit/call the
abstract MapObjectLoader implementation to make use of predefined loading logic.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidafterLoad(Collection<IEntity> entities, IMapObject mapObject) This method is called externally on the loader instance after the entities have been loaded.load(Environment environment, IMapObject mapObject) Loads entities from the specified map object within the given environment.
-
Method Details
-
getMapObjectType
String getMapObjectType() -
load
Loads 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.
-
afterLoad
This method is called externally on the loader instance after the entities have been loaded.- Parameters:
entities- The loaded entities.mapObject- The map object by which the entities have been loaded.
-