Package org.newdawn.slick.particles

Examples of org.newdawn.slick.particles.ConfigurableEmitter


      // set the original emitter in the middle of the screen at the top
      explosionEmitter.setPosition(400,100);
      // create 5 duplicate emitters
      for (int i = 0; i < 5; i++) {
        // a single duplicate of the first emitter is created here
        ConfigurableEmitter newOne = explosionEmitter.duplicate();
        // we might get null as a result - protect against that
        if (newOne == null)
          throw new SlickException("Failed to duplicate explosionEmitter");
        // give the new emitter a new unique name
        newOne.name = newOne.name + "_" + i;
        // place it somewhere on a row below the original emitter
        newOne.setPosition((i+1)* (800/6), 400);
        // and add it to the original particle system to get the new emitter updated and rendered
        explosionSystem.addEmitter(newOne);
      }
    } catch (IOException e) {
      throw new SlickException("Failed to load particle systems", e);
View Full Code Here

TOP

Related Classes of org.newdawn.slick.particles.ConfigurableEmitter

Copyright © 2018 www.massapicom. 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.