I am trying to write some code in Java for drawing sprites on a BufferedImage.
As of now I have each sprite in a single dimension array. However this is not good for my game because each sprite would only have one image for their sprite.
I would like each sprite to be animated meaning there would be more images to be stored. I have tried using two dimensional arrays for this but I keep running into the same issue with only one frame being stored.
What would be the proper way to solve this?
int[][] pxArry;
this.pxArry = new int[][]{
new int [pxArry.length],
new int [pxArry[1].length]
};
for(int i = 0; i < pxArry[0].length; i++)
for(int i2 = 0; i2 < pxArry[1].length; i2++){
this.pxArry[1][i2] = pxArry[1][i2];
}