use of de.gurkenlabs.litiengine.graphics.particles.xml.CustomEmitter in project litiengine by gurkenlabs.
the class EmitterMapObjectLoader method load.
@Override
public Collection<IEntity> load(IEnvironment environment, IMapObject mapObject) {
if (MapObjectType.get(mapObject.getType()) != MapObjectType.EMITTER) {
throw new IllegalArgumentException("Cannot load a mapobject of the type " + mapObject.getType() + " with a loader of the type " + EmitterMapObjectLoader.class);
}
EmitterData data = createEmitterData(mapObject);
CustomEmitter emitter = new CustomEmitter(data);
loadDefaultProperties(emitter, mapObject);
Collection<IEntity> entities = super.load(environment, mapObject);
entities.add(emitter);
return entities;
}
Aggregations