Examples of ParticleEffect


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

    }
  }

  public ParticleEffect openEffect (File file, boolean replaceCurrentWorkspace) {
    try {
      ParticleEffect loadedEffect = load(file.getAbsolutePath(), ParticleEffect.class, null,
        new ParticleEffectLoader.ParticleEffectLoadParameter(particleSystem.getBatches()));
      loadedEffect = loadedEffect.copy();
      loadedEffect.init();
      if(replaceCurrentWorkspace){
        effect = loadedEffect;
        controllersData.clear();
        particleSystem.removeAll();
        particleSystem.add(effect);
View Full Code Here

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

  @Override
  public void handle (int aEventType, Object aEventData) {
    if(aEventType == FlameMain.EVT_ASSET_RELOADED){
      Object[] data = (Object[])aEventData;
      if(data[0] instanceof ParticleEffect){
        ParticleEffect oldEffect = (ParticleEffect) data[0];
        int currentCount = value.templates.size;
        value.templates.removeAll(oldEffect.getControllers(), true);
        if(value.templates.size != currentCount){
          int diff = currentCount - value.templates.size;
          if(diff > 0){
            ParticleEffect newEffect = (ParticleEffect) data[1];
            Array<ParticleController> newControllers = newEffect.getControllers();
            if(newControllers.size > 0){
              for(int i=0, c=Math.min(diff, newControllers.size); i<c; ++i)
                value.templates.add(newControllers.get(i));
            }
          }
View Full Code Here

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

  }
 
  protected void importEffect () {
    File file = editor.showFileLoadDialog();
    if(file != null){
      ParticleEffect effect;
      if( (effect = editor.openEffect(file, false)) != null){
        for(ParticleController controller : effect.getControllers())
          addEmitter(controller, false);
        editIndex = 0;
        emitterTable.getSelectionModel().setSelectionInterval(editIndex, editIndex);
      }
    }
View Full Code Here

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

   
    Array<ParticleController> controllers = new Array<ParticleController>(templates);
    Array<Array<Integer>>effectsIndices = new Array<Array<Integer>>();
   
    for(int i=0; i < effects.size && controllers.size >0; ++i){
      ParticleEffect effect = effects.get(i);
      Array<ParticleController> effectControllers = effect.getControllers();
      Iterator<ParticleController> iterator = controllers.iterator();
      Array<Integer> indices = null;
      while(iterator.hasNext()){
        ParticleController controller = iterator.next();
        int index = -1;
View Full Code Here

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

    SaveData data = resources.getSaveData();
    Array<Array<Integer>>effectsIndices = data.load("indices");
    AssetDescriptor descriptor;
    Iterator<Array<Integer>> iterator = effectsIndices.iterator();
    while((descriptor = data.loadAsset()) != null){
      ParticleEffect effect = (ParticleEffect)manager.get(descriptor);
      if(effect == null)
        throw new RuntimeException("Template is null");
      Array<ParticleController> effectControllers = effect.getControllers();
      Array<Integer> effectIndices = iterator.next();
     
      for(Integer index : effectIndices){
          templates.add(effectControllers.get(index));
      }
View Full Code Here

Examples of com.googlecode.jumpnevolve.graphics.effects.ParticleEffect

    direction = direction.getDirection();
    this.active = active;
    this.force = direction.mul(GRAVITY * force);

    // Darstellungseffekt erstellen
    this.effect = new ParticleEffect(position.sub(direction.mul(Math
        .abs(dimension.y))), new AirFlowEmitterFactory(direction,
        Math.abs(dimension.y) * 2, Math.abs(dimension.x) * 2, force));
  }
View Full Code Here

Examples of com.googlecode.jumpnevolve.graphics.effects.ParticleEffect

            + " Sekunden neugestartet");
  }

  private void createFailedScreen() {
    if (this.failedEffect == null) {
      this.failedEffect = new ParticleEffect(this.getCamera()
          .getPosition(), new FogEmitterFactory());
    }
  }
View Full Code Here

Examples of com.googlecode.jumpnevolve.graphics.effects.ParticleEffect

        "Level erfolgreich beendet");
  }

  private void createFinishedScreen() {
    if (this.finishedEffect == null) {
      this.finishedEffect = new ParticleEffect(this.getCamera()
          .getPosition(), new SprayEmitterFactory());
    }
  }
View Full Code Here

Examples of com.googlecode.jumpnevolve.graphics.effects.ParticleEffect

  public Fluid(World world, Vector position, Vector dimension,
      float maximumVelocity) {
    super(world, ShapeFactory.createRectangle(position, dimension),
        Masses.NO_MASS);
    this.maximumVelocity = maximumVelocity;
    this.effect1 = new ParticleEffect(position, new FogEmitterFactory());
    this.effect2 = new ParticleEffect(position,
        new WaterfallEmitterFactory(dimension.y * 2));
  }
 
View Full Code Here

Examples of com.googlecode.jumpnevolve.graphics.effects.ParticleEffect

    // Nachdem die Einstellungen für die physikalische Welt erledigt sind,
    // kommen nun Einstellungen für das Level
    this.simulatedWorld = new SimulatedWorld(this);
   
    // Wasserfalleffekt einfügen
    this.simulatedWorld.add(new ParticleEffect(new Vector2f(97.5f, -1.0f), new FogEmitterFactory()));
    this.simulatedWorld.add(new ParticleEffect(new Vector2f(97.5f, -40.0f), new WaterfallEmitterFactory(36.0f)));
   
    // Unteres Wasser hinzufügen
    this.simulatedWorld.add(new DrawablePollable() {
      private float y = 0.0f;
      private float timeout = 0.0f;
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.