use of org.terasology.particles.functions.generators.EnergyRangeGeneratorFunction in project Terasology by MovingBlocks.
the class ParticleSystemManagerImpl method initialise.
public void initialise() {
particleUpdater = ParticleUpdater.create(physics);
registerGeneratorFunction(new EnergyRangeGeneratorFunction());
registerGeneratorFunction(new VelocityRangeGeneratorFunction());
registerGeneratorFunction(new ColorRangeGeneratorFunction());
registerGeneratorFunction(new PositionRangeGeneratorFunction());
registerGeneratorFunction(new ScaleRangeGeneratorFunction());
registerGeneratorFunction(new TextureOffsetGeneratorFunction());
registerAffectorFunction(new VelocityAffectorFunction());
registerAffectorFunction(new AccelerationAffectorFunction());
}
use of org.terasology.particles.functions.generators.EnergyRangeGeneratorFunction in project Terasology by MovingBlocks.
the class ParticleUpdaterImplTest method getTestGeneratorsAndAffectors.
private Iterator<Component> getTestGeneratorsAndAffectors() {
Collection<Component> components = new LinkedList<>();
components.add(new EnergyRangeGeneratorComponent(0.5f, 1f));
components.add(new VelocityAffectorComponent());
EnergyRangeGeneratorFunction energyRangeGeneratorFunction = new EnergyRangeGeneratorFunction();
registeredGeneratorFunctions.put(((GeneratorFunction) energyRangeGeneratorFunction).getComponentClass(), energyRangeGeneratorFunction);
VelocityAffectorFunction velocityAffectorFunction = new VelocityAffectorFunction();
registeredAffectorFunctions.put(((AffectorFunction) velocityAffectorFunction).getComponentClass(), velocityAffectorFunction);
return components.iterator();
}
Aggregations