use of com.gempukku.libgdx.graph.util.particles.generator.LinePositionGenerator in project gdx-graph by MarcinSc.
the class Episode18Scene method createExhaust.
private void createExhaust(GraphParticleEffects effects, Vector3 point1, Vector3 point2) {
final LinePositionGenerator positionGenerator = new LinePositionGenerator();
positionGenerator.getPoint1().set(point1);
positionGenerator.getPoint2().set(point2);
DefaultParticleGenerator particleGenerator = new DefaultParticleGenerator(timeKeeper, 0.5f, 0, 1000) {
@Override
protected void generateAttributes(ObjectMap attributes) {
attributes.put("Move X", MathUtils.random(-0.05f, 0.05f));
attributes.put("Move Y", MathUtils.random(-0.05f, 0.05f));
}
};
particleGenerator.setPositionGenerator(positionGenerator);
CommonPropertiesParticleEffectAdapter particleEffectAdapter = new CommonPropertiesParticleEffectAdapter(effects);
particleEffectAdapter.addTag("exhaust", particleGenerator);
particleEffectAdapter.startEffect("exhaust");
}
Aggregations