Examples of ParticleEffect


Examples of ast.effect.ParticleEffect

public  class MainMenu {
 
  private static ParticleEffect effect;
 
  public static void init(){
    effect = new ParticleEffect(new Vector3f(0, 0,-10), 70, 10.1f);   
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.g2d.ParticleEffect

* @author Clément
*/
public class ParticleEffectGDX {

    public ParticleEffectGDX(String effectFile, String imageDir) {
        m_particleEffect = new ParticleEffect();
        FileHandle ef = Gdx.files.absolute(new File(effectFile).getAbsolutePath());
        FileHandle id = Gdx.files.absolute(new File(imageDir).getAbsolutePath());
        m_particleEffect.load(ef, id);
    }
View Full Code Here

Examples of com.badlogic.gdx.graphics.g2d.ParticleEffect

        FileHandle id = Gdx.files.absolute(new File(imageDir).getAbsolutePath());
        m_particleEffect.load(ef, id);
    }

    public ParticleEffect createEffect() {
        return new ParticleEffect(m_particleEffect);
    }
View Full Code Here

Examples of com.badlogic.gdx.graphics.g2d.ParticleEffect

    super(resolver);
  }

  @Override
  public ParticleEffect load (AssetManager am, String fileName, FileHandle file, ParticleEffectParameter param) {
    ParticleEffect effect = new ParticleEffect();
    if (param != null && param.atlasFile != null)
      effect.load(file, am.get(param.atlasFile, TextureAtlas.class), param.atlasPrefix);
    else if (param != null && param.imagesDir != null)
      effect.load(file, param.imagesDir);
    else
      effect.load(file, file.parent());
    return effect;
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.g2d.ParticleEffect

    dialog.setVisible(true);
    final String file = dialog.getFile();
    final String dir = dialog.getDirectory();
    if (dir == null || file == null || file.trim().length() == 0) return;
    lastDir = dir;
    ParticleEffect effect = new ParticleEffect();
    try {
      effect.loadEmitters(Gdx.files.absolute(new File(dir, file).getAbsolutePath()));
      editor.effect = effect;
      emitterTableModel.getDataVector().removeAllElements();
      editor.particleData.clear();
    } catch (Exception ex) {
      System.out.println("Error loading effect: " + new File(dir, file).getAbsolutePath());
      ex.printStackTrace();
      JOptionPane.showMessageDialog(editor, "Error opening effect.");
      return;
    }
    for (ParticleEmitter emitter : effect.getEmitters()) {
      emitter.setPosition(editor.worldCamera.viewportWidth / 2, editor.worldCamera.viewportHeight / 2);
      emitterTableModel.addRow(new Object[] {emitter.getName(), true});
    }
    editIndex = 0;
    emitterTable.getSelectionModel().setSelectionInterval(editIndex, editIndex);
View Full Code Here

Examples of com.badlogic.gdx.graphics.g2d.ParticleEffect

    dialog.setVisible(true);
    final String file = dialog.getFile();
    final String dir = dialog.getDirectory();
    if (dir == null || file == null || file.trim().length() == 0) return;
    lastDir = dir;
    ParticleEffect effect = new ParticleEffect();
    try {
      effect.loadEmitters(Gdx.files.absolute(new File(dir, file).getAbsolutePath()));
      editor.effect = effect;
      emitterTableModel.getDataVector().removeAllElements();
      editor.particleData.clear();
    } catch (Exception ex) {
      System.out.println("Error loading effect: " + new File(dir, file).getAbsolutePath());
      ex.printStackTrace();
      JOptionPane.showMessageDialog(editor, "Error opening effect.");
      return;
    }
    for (ParticleEmitter emitter : effect.getEmitters()) {
      emitter.setPosition(editor.worldCamera.viewportWidth / 2, editor.worldCamera.viewportHeight / 2);
      emitterTableModel.addRow(new Object[] {emitter.getName(), true});
    }
    editIndex = 0;
    emitterTable.getSelectionModel().setSelectionInterval(editIndex, editIndex);
View Full Code Here

Examples of com.badlogic.gdx.graphics.g2d.ParticleEffect

    dialog.setVisible(true);
    final String file = dialog.getFile();
    final String dir = dialog.getDirectory();
    if (dir == null || file == null || file.trim().length() == 0) return;
    lastDir = dir;
    ParticleEffect effect = new ParticleEffect();
    try {
      effect.loadEmitters(Gdx.files.absolute(new File(dir, file).getAbsolutePath()));
      editor.effect = effect;
      emitterTableModel.getDataVector().removeAllElements();
      editor.particleData.clear();
    } catch (Exception ex) {
      System.out.println("Error loading effect: " + new File(dir, file).getAbsolutePath());
      ex.printStackTrace();
      JOptionPane.showMessageDialog(editor, "Error opening effect.");
      return;
    }
    for (ParticleEmitter emitter : effect.getEmitters()) {
      emitter.setPosition(editor.worldCamera.viewportWidth / 2, editor.worldCamera.viewportHeight / 2);
      emitterTableModel.addRow(new Object[] {emitter.getName(), true});
    }
    editIndex = 0;
    emitterTable.getSelectionModel().setSelectionInterval(editIndex, editIndex);
View Full Code Here

Examples of com.badlogic.gdx.graphics.g2d.ParticleEffect

    super(resolver);
  }

  @Override
  public ParticleEffect load (AssetManager am, String fileName, FileHandle file, ParticleEffectParameter param) {
    ParticleEffect effect = new ParticleEffect();
    if (param != null && param.atlasFile != null)
      effect.load(file, am.get(param.atlasFile, TextureAtlas.class), param.atlasPrefix);
    else if (param != null && param.imagesDir != null)
      effect.load(file, param.imagesDir);
    else
      effect.load(file, file.parent());
    return effect;
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.g3d.particles.ParticleEffect

  public FlameMain () {
    super("Flame");
    MathUtils.random = new RandomXS128();
    particleSystem = ParticleSystem.get();
    effect = new ParticleEffect();
    particleSystem.add(effect);
    assetManager = new AssetManager();
    assetManager.setErrorListener(this);
    assetManager.setLoader(ParticleEffect.class, new ParticleEffectLoader(new InternalFileHandleResolver()));
    controllersData = new Array<ControllerData>();
View Full Code Here

Examples of com.badlogic.gdx.graphics.g3d.particles.ParticleEffect

  public Array<ParticleEffect> getParticleEffects (Array<ParticleController> controllers, Array<ParticleEffect> out) {
    out.clear();
    assetManager.getAll(ParticleEffect.class, out);
    for(int i=0; i < out.size;){
      ParticleEffect effect = out.get(i);
      Array<ParticleController> effectControllers = effect.getControllers();
      boolean remove = true;
      for(ParticleController controller : controllers){
        if(effectControllers.contains(controller, true)){
          remove = false;
          break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.