public class PropMapObjectLoader extends MapObjectLoader
| Modifier | Constructor and Description |
|---|---|
protected |
PropMapObjectLoader() |
| Modifier and Type | Method and Description |
|---|---|
protected Prop |
createNewProp(IMapObject mapObject,
java.lang.String spriteSheet) |
java.util.Collection<IEntity> |
load(IEnvironment environment,
IMapObject mapObject) |
static <T extends Prop> |
registerCustomPropType(java.lang.Class<T> propType)
Registers a custom
Prop implementation that can be automatically
provided by this MapObjectLoader. |
getMapObjectType, loadCollisionProperties, loadDefaultPropertiespublic static <T extends Prop> void registerCustomPropType(java.lang.Class<T> propType)
Registers a custom Prop implementation that can be automatically
provided by this MapObjectLoader.
This should only be used if the particular implementation doesn't require any additional map object properties to be initialized.
Make sure that the implementation has the following present:AnimationInfo annotation with one or more sprite prefixes
definedThe latter is particularly useful for classes that can have different sprite sheets, i.e. share the same logic but might have a different appearance.
T - The type of the custom creature implementation.propType - The class of the custom Prop implementation.public java.util.Collection<IEntity> load(IEnvironment environment, IMapObject mapObject)
protected Prop createNewProp(IMapObject mapObject, java.lang.String spriteSheet)