title: particle system in libGdx
body: <p>I want to create a particle system in libgdx. I know there is particle classes in libgdx, but I want to create it on myself. Particle system is about snow. I write a class for just one snow to fall from top to ground, in the way it move to left and right (so little). 
  This is my class : </p>
  
  <pre><code>public class Particle implements ApplicationListener{
  SpriteBatch batch;
  Texture texture;
  Random rand = new Random();
  float randX = rand.nextFloat() * 480;
  float randY = 322;
  Pixmap circle;
  
  boolean gravity = true;
  Vector2 Vgravity;
  Vector2 position;
  float snowMovement;
  int j = 1;
  
  @Override
  public void create() {
      if (randX &lt; 10) {
          randX = 10;
      }else if (randX &gt; 460) {
          randX = 460;
      }
  
      batch = new SpriteBatch();
      circle = new Pixmap(4, 4, Pixmap.Format.RGB888);
      texture = new Texture(circle);
  
      circle.setColor(Color.WHITE);
      circle.fillCircle(4/2, 4/2, 4/2);
      texture.draw(circle, 0, 0);
      texture.bind();
  
      position = new Vector2(randX, randY);
  
      //setGravity(gravity, new Vector2(0, -20));
  }
  
  public void setGravity(boolean gravity, Vector2 Vgravity){
      this.Vgravity = Vgravity;
      snowMovement = 60;
  }
  
  @Override
  public void dispose() {
      /*
      texture.dispose();
      circle.dispose();
      batch.dispose();
      */
  }
  
  @Override
  public void pause() {
      // TODO Auto-generated method stub
  
  }
  
  @Override
  public void render() {
      float deltaTime = Gdx.graphics.getDeltaTime();
  
      Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
      batch.begin();
      batch.draw(texture, position.x, position.y);
      batch.end();
  
      if (gravity) {
          position.y += Vgravity.y * deltaTime;
          position.x += snowMovement * j * deltaTime;
          j *= -1;
      }
  }
  
  @Override
  public void resize(int arg0, int arg1) {
      // TODO Auto-generated method stub
  
  }
  
  @Override
  public void resume() {
      // TODO Auto-generated method stub
  
  }
  }
  </code></pre>
  
  <p>Now, I want to create a class to call "Particle" class, for example 100 time. But... I don't know who I must call it. I use this code but, when I run it, it just show one snow. In another word the second particle not read.</p>
  
  <pre><code>public class Emitter extends Particle{
  Particle part = new Particle();
  Particle part2 = new Particle();
  Array&lt;Particle&gt; particle = new Array&lt;Particle&gt;();
  public void create(){
      part.create();
      part.setGravity(true, new Vector2(0, -20));
      part2.create();
      part2.setGravity(true, new Vector2(0, -20));
      particle.add(part);
      particle.add(part2);
  }
  public void render(){
      for (int i = 0; i &lt; particle.size; i++) {
          Particle num = particle.get(i);
          num.render();
  
      }
  }
  }
  </code></pre>
  
  <p>"this class is just for example..."</p>
  
  <p>I don't know where I must call it or has my "Particle" class problem or...<br>
  plz help.</p>