use of com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader in project libgdx by libgdx.
the class FlameMain method saveEffect.
public void saveEffect(File file) {
Writer fileWriter = null;
try {
ParticleEffectLoader loader = (ParticleEffectLoader) assetManager.getLoader(ParticleEffect.class);
loader.save(effect, new ParticleEffectSaveParameter(new FileHandle(file.getAbsolutePath()), assetManager, particleSystem.getBatches()));
} catch (Exception ex) {
System.out.println("Error saving effect: " + file.getAbsolutePath());
ex.printStackTrace();
JOptionPane.showMessageDialog(this, "Error saving effect.");
} finally {
StreamUtils.closeQuietly(fileWriter);
}
}
Aggregations