Sprite Animation to create effect using Atlas

Ok, i was thinking in making a timer but… i noticed it will only gen more problems.
So i worked out this, please tell me what you think :stuck_out_tongue:

package Main;

import Atlas.Atlas;
import Atlas.Explosions;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import java.util.ArrayList;

/**
 *
 * @author André Lopes
 */
public class ShooterGame implements ApplicationListener {

    private Explosions explosions;
    private SpriteBatch spritebatch;


    @Override
    public void create() {
        explosions = new Explosions();
        spritebatch = new SpriteBatch();
      
        explosions.addExplosionsHappening(new Explosions(),20,25);
        explosions.addExplosionsHappening(new Explosions(),100,185);
    }

    @Override
    public void render() {

        Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

        
        explode();

    }

    public void explode() {

        spritebatch.begin();

        for (int i = 0; i < explosions.getExplosionsHappening().size(); i++) 
        {
            Explosions getExp = explosions.getExplosionsHappening().get(i);
            spritebatch.draw(getExp.getCurrentFrame(),getExp.posx, getExp.posy);
        }

        spritebatch.flush();
        spritebatch.end();
    }

    //////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////
    @Override
    public void resize(int width, int height) {
    }

    @Override
    public void pause() {
    }

    @Override
    public void resume() {
    }

    @Override
    public void dispose() {
    }
}

And now the Explosion Class, i know the ArrayList shouldnt be here, but its just for a test anyway :

package Atlas;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Animation;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import java.util.ArrayList;

public class Explosions {

    private static final int FRAME_COLS = 8;
    private static final int FRAME_ROWS = 6;
    Animation walkAnimation;
    Texture walkSheet;
    TextureRegion[] walkFrames;
    SpriteBatch spriteBatch;
    TextureRegion currentFrame;
    float stateTime;

    private ArrayList<Explosions> explosionsHappening;
    public int posx,posy;
    
    public Explosions() {
        //Atlas.generateAtlas();
        explosionsHappening = new ArrayList<>();
        walkSheet = new Texture(Gdx.files.internal("Explosion2spritesheet.png"));

        TextureRegion[][] tmp = TextureRegion.split(walkSheet, walkSheet.getWidth() / FRAME_COLS, walkSheet.getHeight() / FRAME_ROWS);

        walkFrames = new TextureRegion[FRAME_COLS * FRAME_ROWS];
        int index = 0;
        for (int i = 0; i < FRAME_ROWS; i++) {
            for (int j = 0; j < FRAME_COLS; j++) {
                walkFrames[index++] = tmp[i][j];
            }
        }

        walkAnimation = new Animation(0.025f, walkFrames);
        spriteBatch = new SpriteBatch();
        stateTime = 0f;

    }
   
    
    public TextureRegion getCurrentFrame()
    {
        stateTime += Gdx.graphics.getDeltaTime();                  
        currentFrame = walkAnimation.getKeyFrame(stateTime,false);  
        
        return currentFrame;
    }

    public ArrayList<Explosions> getExplosionsHappening() {
        return explosionsHappening;
    }

    public void addExplosionsHappening(Explosions exp,int posX,int posY) {
        exp.posx = posX;
        exp.posy = posY;
        this.explosionsHappening.add(exp);
    }
    
    
}