public class CreatureMapObjectLoader extends MapObjectLoader
| Modifier | Constructor and Description |
|---|---|
protected |
CreatureMapObjectLoader() |
| Modifier and Type | Method and Description |
|---|---|
protected Creature |
createNewCreature(IMapObject mapObject,
java.lang.String spriteSheet,
java.lang.String spawnType) |
java.util.Collection<IEntity> |
load(IEnvironment environment,
IMapObject mapObject) |
static <T extends Creature> |
registerCustomCreatureType(java.lang.Class<T> creatureType)
Registers a custom
Creature implementation that can be
automatically provided by this MapObjectLoader. |
getMapObjectType, loadCollisionProperties, loadDefaultPropertiespublic static <T extends Creature> void registerCustomCreatureType(java.lang.Class<T> creatureType)
Registers a custom Creature 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.creatureType - The class of the custom Creature implementation.public java.util.Collection<IEntity> load(IEnvironment environment, IMapObject mapObject)
protected Creature createNewCreature(IMapObject mapObject, java.lang.String spriteSheet, java.lang.String spawnType)