tuioFireNode.attachChild(flame1);
tuioFireNode.attachChild(flame2);
}
private ParticleEmitter getEmitter(String name) {
ParticleEmitter flame = new ParticleEmitter(name, Type.Triangle, 32);
flame.setSelectRandomImage(true);
flame.setStartColor(new ColorRGBA(1f, 0.4f, 0.05f, 1f));
flame.setEndColor(new ColorRGBA(.4f, .22f, .12f, 0f));
flame.setStartSize(1.3f);
flame.setEndSize(2f);
flame.setShape(new EmitterSphereShape(Vector3f.ZERO, 1f));
flame.setParticlesPerSec(0);
flame.setGravity(-5f);
flame.setLowLife(1f);
flame.setHighLife(1f);
flame.setInitialVelocity(new Vector3f(0, 7, 0));
flame.setVelocityVariation(1f);
flame.setImagesX(2);
flame.setImagesY(2);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
mat.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/flame.png"));
mat.setBoolean("PointSprite", true);
flame.setMaterial(mat);
return flame;
}