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

项目: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    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#updateParticle(org.newdawn.slick.particles.Particle, int)
 */
public void updateParticle(Particle particle, int delta) {
    if (particle.getLife() > 600) {
        particle.adjustSize(0.07f * delta);
    } else {
        particle.adjustSize(-0.04f * delta * (size / 40.0f));
    }
    float c = 0.002f * delta;
    particle.adjustColor(0,-c/2,-c*2,-c/4);
}
项目:trashjam2017    文件:ColorPanel.java   
/**
 * Update the render setting
 */
private void updateRender() {
    if (inherit.isSelected())
    {
        emitter.usePoints = Particle.INHERIT_POINTS;
        oriented.setEnabled( true );
    }
    if (quads.isSelected())
    {
        emitter.usePoints = Particle.USE_QUADS;
        oriented.setEnabled( true );
    }
    if (points.isSelected())
    {
        emitter.usePoints = Particle.USE_POINTS;
        oriented.setEnabled( false );
        oriented.setSelected( false );
    }

    // oriented
    if( oriented.isSelected())
        emitter.useOriented= true;
    else
        emitter.useOriented= false;

    // additive blending
    if( additive.isSelected())
        emitter.useAdditive= true;
    else
        emitter.useAdditive= false;
}
项目: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    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#updateParticle(org.newdawn.slick.particles.Particle, int)
 */
public void updateParticle(Particle particle, int delta) {
    if (particle.getLife() > 600) {
        particle.adjustSize(0.07f * delta);
    } else {
        particle.adjustSize(-0.04f * delta * (size / 40.0f));
    }
    float c = 0.002f * delta;
    particle.adjustColor(0,-c/2,-c*2,-c/4);
}
项目:Progetto-C    文件:ColorPanel.java   
/**
 * Update the render setting
 */
private void updateRender() {
    if (inherit.isSelected())
    {
        emitter.usePoints = Particle.INHERIT_POINTS;
        oriented.setEnabled( true );
    }
    if (quads.isSelected())
    {
        emitter.usePoints = Particle.USE_QUADS;
        oriented.setEnabled( true );
    }
    if (points.isSelected())
    {
        emitter.usePoints = Particle.USE_POINTS;
        oriented.setEnabled( false );
        oriented.setSelected( false );
    }

    // oriented
    if( oriented.isSelected())
        emitter.useOriented= true;
    else
        emitter.useOriented= false;

    // additive blending
    if( additive.isSelected())
        emitter.useAdditive= true;
    else
        emitter.useAdditive= false;
}
项目: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    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#updateParticle(org.newdawn.slick.particles.Particle, int)
 */
public void updateParticle(Particle particle, int delta) {
    if (particle.getLife() > 600) {
        particle.adjustSize(0.07f * delta);
    } else {
        particle.adjustSize(-0.04f * delta * (size / 40.0f));
    }
    float c = 0.002f * delta;
    particle.adjustColor(0,-c/2,-c*2,-c/4);
}
项目: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#updateParticle(org.newdawn.slick.particles.Particle, int)
 */
public void updateParticle(Particle particle, int delta) {
    if (particle.getLife() > 600) {
        particle.adjustSize(0.07f * delta);
    } else {
        particle.adjustSize(-0.04f * delta * (size / 40.0f));
    }
    float c = 0.002f * delta;
    particle.adjustColor(0,-c/2,-c*2,-c/4);
}
项目: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#updateParticle(org.newdawn.slick.particles.Particle, int)
 */
public void updateParticle(Particle particle, int delta) {
    if (particle.getLife() > 600) {
        particle.adjustSize(0.07f * delta);
    } else {
        particle.adjustSize(-0.04f * delta * (size / 40.0f));
    }
    float c = 0.002f * delta;
    particle.adjustColor(0,-c/2,-c*2,-c/4);
}
项目: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    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#updateParticle(org.newdawn.slick.particles.Particle, int)
 */
public void updateParticle(Particle particle, int delta) {
    if (particle.getLife() > 600) {
        particle.adjustSize(0.07f * delta);
    } else {
        particle.adjustSize(-0.04f * delta * (size / 40.0f));
    }
    float c = 0.002f * delta;
    particle.adjustColor(0,-c/2,-c*2,-c/4);
}
项目:Disparity-RHE    文件:ColorPanel.java   
/**
 * Update the render setting
 */
private void updateRender() {
    if (inherit.isSelected())
    {
        emitter.usePoints = Particle.INHERIT_POINTS;
        oriented.setEnabled( true );
    }
    if (quads.isSelected())
    {
        emitter.usePoints = Particle.USE_QUADS;
        oriented.setEnabled( true );
    }
    if (points.isSelected())
    {
        emitter.usePoints = Particle.USE_POINTS;
        oriented.setEnabled( false );
        oriented.setSelected( false );
    }

    // oriented
    if( oriented.isSelected())
        emitter.useOriented= true;
    else
        emitter.useOriented= false;

    // additive blending
    if( additive.isSelected())
        emitter.useAdditive= true;
    else
        emitter.useAdditive= false;
}
项目: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    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#updateParticle(org.newdawn.slick.particles.Particle, int)
 */
public void updateParticle(Particle particle, int delta) {
    if (particle.getLife() > 600) {
        particle.adjustSize(0.07f * delta);
    } else {
        particle.adjustSize(-0.04f * delta * (size / 40.0f));
    }
    float c = 0.002f * delta;
    particle.adjustColor(0,-c/2,-c*2,-c/4);
}
项目: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    文件:FireEmitter.java   
/**
 * @see org.newdawn.slick.particles.ParticleEmitter#updateParticle(org.newdawn.slick.particles.Particle, int)
 */
public void updateParticle(Particle particle, int delta) {
    if (particle.getLife() > 600) {
        particle.adjustSize(0.07f * delta);
    } else {
        particle.adjustSize(-0.04f * delta * (size / 40.0f));
    }
    float c = 0.002f * delta;
    particle.adjustColor(0,-c/2,-c*2,-c/4);
}
项目:slick2d-maven    文件:ColorPanel.java   
/**
 * Update the render setting
 */
private void updateRender() {
    if (inherit.isSelected())
    {
        emitter.usePoints = Particle.INHERIT_POINTS;
        oriented.setEnabled( true );
    }
    if (quads.isSelected())
    {
        emitter.usePoints = Particle.USE_QUADS;
        oriented.setEnabled( true );
    }
    if (points.isSelected())
    {
        emitter.usePoints = Particle.USE_POINTS;
        oriented.setEnabled( false );
        oriented.setSelected( false );
    }

    // oriented
    if( oriented.isSelected())
        emitter.useOriented= true;
    else
        emitter.useOriented= false;

    // additive blending
    if( additive.isSelected())
        emitter.useAdditive= true;
    else
        emitter.useAdditive= false;
}