Java 类org.newdawn.slick.particles.ParticleSystem 实例源码

项目:trashjam2017    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#update(org.newdawn.slick.particles.ParticleSystem, int)
 */
public void update(ParticleSystem system, int delta) {
    timer -= delta;
    if (timer <= 0) {
        timer = interval;
        Particle p = system.getNewParticle(this, 1000);
        p.setColor(1, 1, 1, 0.5f);
        p.setPosition(x, y);
        p.setSize(size);
        float vx = (float) (-0.02f + (Math.random() * 0.04f));
        float vy = (float) (-(Math.random() * 0.15f));
        p.setVelocity(vx,vy,1.1f);
    }
}
项目:trashjam2017    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    Image image = new Image("testdata/particle.tga", true);
    system = new ParticleSystem(image);

    system.addEmitter(new FireEmitter(400,300,45));
    system.addEmitter(new FireEmitter(200,300,60));
    system.addEmitter(new FireEmitter(600,300,30));

    //system.setUsePoints(true);
}
项目:trashjam2017    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#keyPressed(int, char)
 */
public void keyPressed(int key, char c) {
    if (key == Input.KEY_ESCAPE) {
        System.exit(0);
    }
    if (key == Input.KEY_SPACE) {
        mode = ParticleSystem.BLEND_ADDITIVE == mode ? ParticleSystem.BLEND_COMBINE : ParticleSystem.BLEND_ADDITIVE;
        system.setBlendingMode(mode);
    }
}
项目:trashjam2017    文件:ParticleGame.java   
/**
 * Clear the particle system held in this canvas
 * 
 * @param additive
 *            True if the particle system should be set to additive
 */
public void clearSystem(boolean additive) {
    system = new ParticleSystem("org/newdawn/slick/data/particle.tga", 2000);
    if (additive) {
        system.setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
    }
    system.setRemoveCompletedEmitters(false);
}
项目:trashjam2017    文件:ParticleGame.java   
/**
 * Set the particle system to be displayed
 * 
 * @param system
 *            The system to be displayed
 */
public void setSystem(ParticleSystem system) {
    this.system = system;
    emitters.clear();
    system.setRemoveCompletedEmitters(false);
    for (int i = 0; i < system.getEmitterCount(); i++) {
        emitters.add(system.getEmitter(i));
    }
}
项目:trashjam2017    文件:ParticleGame.java   
public void init(GameContainer container) throws SlickException {
    container.getInput().addListener(listener);
    container.setShowFPS(false);

    system = new ParticleSystem("org/newdawn/slick/data/particle.tga", 2000);
    system.setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
    system.setRemoveCompletedEmitters(false);

    for (int i = 0; i < waiting.size(); i++) {
        system.addEmitter((ParticleEmitter) waiting.get(i));
    }
    waiting.clear();
}
项目:trashjam2017    文件:ParticleEditor.java   
/**
 * Change the visual indicator for the current particle system 
 * blend mode
 */
public void updateBlendMode() {
    if (additive.isSelected()) {
        game.getSystem().setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
        } else {
        game.getSystem().setBlendingMode(ParticleSystem.BLEND_COMBINE);
        }
}
项目:Progetto-C    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#update(org.newdawn.slick.particles.ParticleSystem, int)
 */
public void update(ParticleSystem system, int delta) {
    timer -= delta;
    if (timer <= 0) {
        timer = interval;
        Particle p = system.getNewParticle(this, 1000);
        p.setColor(1, 1, 1, 0.5f);
        p.setPosition(x, y);
        p.setSize(size);
        float vx = (float) (-0.02f + (Math.random() * 0.04f));
        float vy = (float) (-(Math.random() * 0.15f));
        p.setVelocity(vx,vy,1.1f);
    }
}
项目:Progetto-C    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    Image image = new Image("testdata/particle.tga", true);
    system = new ParticleSystem(image);

    system.addEmitter(new FireEmitter(400,300,45));
    system.addEmitter(new FireEmitter(200,300,60));
    system.addEmitter(new FireEmitter(600,300,30));

    //system.setUsePoints(true);
}
项目:Progetto-C    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#keyPressed(int, char)
 */
public void keyPressed(int key, char c) {
    if (key == Input.KEY_ESCAPE) {
        System.exit(0);
    }
    if (key == Input.KEY_SPACE) {
        mode = ParticleSystem.BLEND_ADDITIVE == mode ? ParticleSystem.BLEND_COMBINE : ParticleSystem.BLEND_ADDITIVE;
        system.setBlendingMode(mode);
    }
}
项目:Progetto-C    文件:ParticleGame.java   
/**
 * Clear the particle system held in this canvas
 * 
 * @param additive
 *            True if the particle system should be set to additive
 */
public void clearSystem(boolean additive) {
    system = new ParticleSystem("org/newdawn/slick/data/particle.tga", 2000);
    if (additive) {
        system.setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
    }
    system.setRemoveCompletedEmitters(false);
}
项目:Progetto-C    文件:ParticleGame.java   
/**
 * Set the particle system to be displayed
 * 
 * @param system
 *            The system to be displayed
 */
public void setSystem(ParticleSystem system) {
    this.system = system;
    emitters.clear();
    system.setRemoveCompletedEmitters(false);
    for (int i = 0; i < system.getEmitterCount(); i++) {
        emitters.add(system.getEmitter(i));
    }
}
项目:Progetto-C    文件:ParticleGame.java   
public void init(GameContainer container) throws SlickException {
    container.getInput().addListener(listener);
    container.setShowFPS(false);

    system = new ParticleSystem("org/newdawn/slick/data/particle.tga", 2000);
    system.setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
    system.setRemoveCompletedEmitters(false);

    for (int i = 0; i < waiting.size(); i++) {
        system.addEmitter((ParticleEmitter) waiting.get(i));
    }
    waiting.clear();
}
项目:Progetto-C    文件:ParticleEditor.java   
/**
 * Change the visual indicator for the current particle system 
 * blend mode
 */
public void updateBlendMode() {
    if (additive.isSelected()) {
        game.getSystem().setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
        } else {
        game.getSystem().setBlendingMode(ParticleSystem.BLEND_COMBINE);
        }
}
项目:BaseClient    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#update(org.newdawn.slick.particles.ParticleSystem, int)
 */
public void update(ParticleSystem system, int delta) {
    timer -= delta;
    if (timer <= 0) {
        timer = interval;
        Particle p = system.getNewParticle(this, 1000);
        p.setColor(1, 1, 1, 0.5f);
        p.setPosition(x, y);
        p.setSize(size);
        float vx = (float) (-0.02f + (Math.random() * 0.04f));
        float vy = (float) (-(Math.random() * 0.15f));
        p.setVelocity(vx,vy,1.1f);
    }
}
项目:BaseClient    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    Image image = new Image("testdata/particle.tga", true);
    system = new ParticleSystem(image);

    system.addEmitter(new FireEmitter(400,300,45));
    system.addEmitter(new FireEmitter(200,300,60));
    system.addEmitter(new FireEmitter(600,300,30));

    //system.setUsePoints(true);
}
项目:BaseClient    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#keyPressed(int, char)
 */
public void keyPressed(int key, char c) {
    if (key == Input.KEY_ESCAPE) {
        System.exit(0);
    }
    if (key == Input.KEY_SPACE) {
        mode = ParticleSystem.BLEND_ADDITIVE == mode ? ParticleSystem.BLEND_COMBINE : ParticleSystem.BLEND_ADDITIVE;
        system.setBlendingMode(mode);
    }
}
项目:MMO-Rulemasters-World    文件:BackgroundPlanetScene.java   
public void init(GameContainer container, StateBasedGame game)
        throws SlickException {
    mGame = game;
    Image image = new Image("res/effects/particle.tga", true);
    mParticleSystem = new ParticleSystem(image);
    mBd1 = (Image)DatasManager.getInstance().getFile("Image.menubackground");
    mBd2 = (Image)DatasManager.getInstance().getFile("Image.menuplanet");
    mParticleSystem.addEmitter(new FireEmitter(500, 400, 580));
}
项目:GPVM    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#update(org.newdawn.slick.particles.ParticleSystem, int)
 */
public void update(ParticleSystem system, int delta) {
    timer -= delta;
    if (timer <= 0) {
        timer = interval;
        Particle p = system.getNewParticle(this, 1000);
        p.setColor(1, 1, 1, 0.5f);
        p.setPosition(x, y);
        p.setSize(size);
        float vx = (float) (-0.02f + (Math.random() * 0.04f));
        float vy = (float) (-(Math.random() * 0.15f));
        p.setVelocity(vx,vy,1.1f);
    }
}
项目:GPVM    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#update(org.newdawn.slick.particles.ParticleSystem, int)
 */
public void update(ParticleSystem system, int delta) {
    timer -= delta;
    if (timer <= 0) {
        timer = interval;
        Particle p = system.getNewParticle(this, 1000);
        p.setColor(1, 1, 1, 0.5f);
        p.setPosition(x, y);
        p.setSize(size);
        float vx = (float) (-0.02f + (Math.random() * 0.04f));
        float vy = (float) (-(Math.random() * 0.15f));
        p.setVelocity(vx,vy,1.1f);
    }
}
项目:GPVM    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    Image image = new Image("testdata/particle.tga", true);
    system = new ParticleSystem(image);

    system.addEmitter(new FireEmitter(400,300,45));
    system.addEmitter(new FireEmitter(200,300,60));
    system.addEmitter(new FireEmitter(600,300,30));

    //system.setUsePoints(true);
}
项目:GPVM    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#keyPressed(int, char)
 */
public void keyPressed(int key, char c) {
    if (key == Input.KEY_ESCAPE) {
        System.exit(0);
    }
    if (key == Input.KEY_SPACE) {
        mode = ParticleSystem.BLEND_ADDITIVE == mode ? ParticleSystem.BLEND_COMBINE : ParticleSystem.BLEND_ADDITIVE;
        system.setBlendingMode(mode);
    }
}
项目:SpaceStationAlpha    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#update(org.newdawn.slick.particles.ParticleSystem, int)
 */
public void update(ParticleSystem system, int delta) {
    timer -= delta;
    if (timer <= 0) {
        timer = interval;
        Particle p = system.getNewParticle(this, 1000);
        p.setColor(1, 1, 1, 0.5f);
        p.setPosition(x, y);
        p.setSize(size);
        float vx = (float) (-0.02f + (Math.random() * 0.04f));
        float vy = (float) (-(Math.random() * 0.15f));
        p.setVelocity(vx,vy,1.1f);
    }
}
项目:SpaceStationAlpha    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    Image image = new Image("testdata/particle.tga", true);
    system = new ParticleSystem(image);

    system.addEmitter(new FireEmitter(400,300,45));
    system.addEmitter(new FireEmitter(200,300,60));
    system.addEmitter(new FireEmitter(600,300,30));

    //system.setUsePoints(true);
}
项目:SpaceStationAlpha    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#keyPressed(int, char)
 */
public void keyPressed(int key, char c) {
    if (key == Input.KEY_ESCAPE) {
        System.exit(0);
    }
    if (key == Input.KEY_SPACE) {
        mode = ParticleSystem.BLEND_ADDITIVE == mode ? ParticleSystem.BLEND_COMBINE : ParticleSystem.BLEND_ADDITIVE;
        system.setBlendingMode(mode);
    }
}
项目:Disparity-RHE    文件:ParticleGame.java   
/**
 * Clear the particle system held in this canvas
 * 
 * @param additive
 *            True if the particle system should be set to additive
 */
public void clearSystem(boolean additive) {
    system = new ParticleSystem("org/newdawn/slick/data/particle.tga", 2000);
    if (additive) {
        system.setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
    }
    system.setRemoveCompletedEmitters(false);
}
项目:Disparity-RHE    文件:ParticleGame.java   
/**
 * Set the particle system to be displayed
 * 
 * @param system
 *            The system to be displayed
 */
public void setSystem(ParticleSystem system) {
    this.system = system;
    emitters.clear();
    system.setRemoveCompletedEmitters(false);
    for (int i = 0; i < system.getEmitterCount(); i++) {
        emitters.add(system.getEmitter(i));
    }
}
项目:Disparity-RHE    文件:ParticleGame.java   
public void init(GameContainer container) throws SlickException {
    container.getInput().addListener(listener);
    container.setShowFPS(false);

    system = new ParticleSystem("org/newdawn/slick/data/particle.tga", 2000);
    system.setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
    system.setRemoveCompletedEmitters(false);

    for (int i = 0; i < waiting.size(); i++) {
        system.addEmitter((ParticleEmitter) waiting.get(i));
    }
    waiting.clear();
}
项目:Disparity-RHE    文件:ParticleEditor.java   
/**
 * Change the visual indicator for the current particle system 
 * blend mode
 */
public void updateBlendMode() {
    if (additive.isSelected()) {
        game.getSystem().setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
        } else {
        game.getSystem().setBlendingMode(ParticleSystem.BLEND_COMBINE);
        }
}
项目:cretion    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#update(org.newdawn.slick.particles.ParticleSystem, int)
 */
public void update(ParticleSystem system, int delta) {
    timer -= delta;
    if (timer <= 0) {
        timer = interval;
        Particle p = system.getNewParticle(this, 1000);
        p.setColor(1, 1, 1, 0.5f);
        p.setPosition(x, y);
        p.setSize(size);
        float vx = (float) (-0.02f + (Math.random() * 0.04f));
        float vy = (float) (-(Math.random() * 0.15f));
        p.setVelocity(vx,vy,1.1f);
    }
}
项目:cretion    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    Image image = new Image("testdata/particle.tga", true);
    system = new ParticleSystem(image);

    system.addEmitter(new FireEmitter(400,300,45));
    system.addEmitter(new FireEmitter(200,300,60));
    system.addEmitter(new FireEmitter(600,300,30));

    //system.setUsePoints(true);
}
项目:cretion    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#keyPressed(int, char)
 */
public void keyPressed(int key, char c) {
    if (key == Input.KEY_ESCAPE) {
        System.exit(0);
    }
    if (key == Input.KEY_SPACE) {
        mode = ParticleSystem.BLEND_ADDITIVE == mode ? ParticleSystem.BLEND_COMBINE : ParticleSystem.BLEND_ADDITIVE;
        system.setBlendingMode(mode);
    }
}
项目:slick2d-maven    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#update(org.newdawn.slick.particles.ParticleSystem, int)
 */
public void update(ParticleSystem system, int delta) {
    timer -= delta;
    if (timer <= 0) {
        timer = interval;
        Particle p = system.getNewParticle(this, 1000);
        p.setColor(1, 1, 1, 0.5f);
        p.setPosition(x, y);
        p.setSize(size);
        float vx = (float) (-0.02f + (Math.random() * 0.04f));
        float vy = (float) (-(Math.random() * 0.15f));
        p.setVelocity(vx,vy,1.1f);
    }
}
项目:slick2d-maven    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
    Image image = new Image("testdata/particle.tga", true);
    system = new ParticleSystem(image);

    system.addEmitter(new FireEmitter(400,300,45));
    system.addEmitter(new FireEmitter(200,300,60));
    system.addEmitter(new FireEmitter(600,300,30));

    //system.setUsePoints(true);
}
项目:slick2d-maven    文件:ParticleTest.java   
/**
 * @see org.newdawn.slick.BasicGame#keyPressed(int, char)
 */
public void keyPressed(int key, char c) {
    if (key == Input.KEY_ESCAPE) {
        System.exit(0);
    }
    if (key == Input.KEY_SPACE) {
        mode = ParticleSystem.BLEND_ADDITIVE == mode ? ParticleSystem.BLEND_COMBINE : ParticleSystem.BLEND_ADDITIVE;
        system.setBlendingMode(mode);
    }
}
项目:slick2d-maven    文件:ParticleGame.java   
/**
 * Clear the particle system held in this canvas
 * 
 * @param additive
 *            True if the particle system should be set to additive
 */
public void clearSystem(boolean additive) {
    system = new ParticleSystem("org/newdawn/slick/data/particle.tga", 2000);
    if (additive) {
        system.setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
    }
    system.setRemoveCompletedEmitters(false);
}
项目:slick2d-maven    文件:ParticleGame.java   
/**
 * Set the particle system to be displayed
 * 
 * @param system
 *            The system to be displayed
 */
public void setSystem(ParticleSystem system) {
    this.system = system;
    emitters.clear();
    system.setRemoveCompletedEmitters(false);
    for (int i = 0; i < system.getEmitterCount(); i++) {
        emitters.add(system.getEmitter(i));
    }
}
项目:slick2d-maven    文件:ParticleGame.java   
public void init(GameContainer container) throws SlickException {
    container.getInput().addListener(listener);
    container.setShowFPS(false);

    system = new ParticleSystem("org/newdawn/slick/data/particle.tga", 2000);
    system.setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
    system.setRemoveCompletedEmitters(false);

    for (int i = 0; i < waiting.size(); i++) {
        system.addEmitter((ParticleEmitter) waiting.get(i));
    }
    waiting.clear();
}
项目:slick2d-maven    文件:ParticleEditor.java   
/**
 * Change the visual indicator for the current particle system 
 * blend mode
 */
public void updateBlendMode() {
    if (additive.isSelected()) {
        game.getSystem().setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
        } else {
        game.getSystem().setBlendingMode(ParticleSystem.BLEND_COMBINE);
        }
}
项目:trashjam2017    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#usePoints(org.newdawn.slick.particles.ParticleSystem)
 */
public boolean usePoints(ParticleSystem system) {
    return false;
}