Search in sources :

Example 1 with EnergyRangeGeneratorFunction

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());
}
Also used : TextureOffsetGeneratorFunction(org.terasology.particles.functions.generators.TextureOffsetGeneratorFunction) EnergyRangeGeneratorFunction(org.terasology.particles.functions.generators.EnergyRangeGeneratorFunction) VelocityRangeGeneratorFunction(org.terasology.particles.functions.generators.VelocityRangeGeneratorFunction) VelocityAffectorFunction(org.terasology.particles.functions.affectors.VelocityAffectorFunction) ScaleRangeGeneratorFunction(org.terasology.particles.functions.generators.ScaleRangeGeneratorFunction) PositionRangeGeneratorFunction(org.terasology.particles.functions.generators.PositionRangeGeneratorFunction) AccelerationAffectorFunction(org.terasology.particles.functions.affectors.AccelerationAffectorFunction) ColorRangeGeneratorFunction(org.terasology.particles.functions.generators.ColorRangeGeneratorFunction)

Example 2 with EnergyRangeGeneratorFunction

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();
}
Also used : EnergyRangeGeneratorFunction(org.terasology.particles.functions.generators.EnergyRangeGeneratorFunction) VelocityAffectorFunction(org.terasology.particles.functions.affectors.VelocityAffectorFunction) EnergyRangeGeneratorComponent(org.terasology.particles.components.generators.EnergyRangeGeneratorComponent) EnergyRangeGeneratorComponent(org.terasology.particles.components.generators.EnergyRangeGeneratorComponent) ParticleEmitterComponent(org.terasology.particles.components.ParticleEmitterComponent) VelocityAffectorComponent(org.terasology.particles.components.affectors.VelocityAffectorComponent) Component(org.terasology.entitySystem.Component) LinkedList(java.util.LinkedList) VelocityAffectorComponent(org.terasology.particles.components.affectors.VelocityAffectorComponent)

Aggregations

VelocityAffectorFunction (org.terasology.particles.functions.affectors.VelocityAffectorFunction)2 EnergyRangeGeneratorFunction (org.terasology.particles.functions.generators.EnergyRangeGeneratorFunction)2 LinkedList (java.util.LinkedList)1 Component (org.terasology.entitySystem.Component)1 ParticleEmitterComponent (org.terasology.particles.components.ParticleEmitterComponent)1 VelocityAffectorComponent (org.terasology.particles.components.affectors.VelocityAffectorComponent)1 EnergyRangeGeneratorComponent (org.terasology.particles.components.generators.EnergyRangeGeneratorComponent)1 AccelerationAffectorFunction (org.terasology.particles.functions.affectors.AccelerationAffectorFunction)1 ColorRangeGeneratorFunction (org.terasology.particles.functions.generators.ColorRangeGeneratorFunction)1 PositionRangeGeneratorFunction (org.terasology.particles.functions.generators.PositionRangeGeneratorFunction)1 ScaleRangeGeneratorFunction (org.terasology.particles.functions.generators.ScaleRangeGeneratorFunction)1 TextureOffsetGeneratorFunction (org.terasology.particles.functions.generators.TextureOffsetGeneratorFunction)1 VelocityRangeGeneratorFunction (org.terasology.particles.functions.generators.VelocityRangeGeneratorFunction)1