Search in sources :

Example 1 with VelocityAffectorComponent

use of org.terasology.particles.components.affectors.VelocityAffectorComponent 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

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 VelocityAffectorFunction (org.terasology.particles.functions.affectors.VelocityAffectorFunction)1 EnergyRangeGeneratorFunction (org.terasology.particles.functions.generators.EnergyRangeGeneratorFunction)1