Hi, I’m trying to say when an enemy disappear from the screen it will move from 1 array to the next while maintaining the previous shape it has already drew. However, whenever I run the code it seems to draw all the arrays for me.
Can someone help me trouble shoot this and tell me what to add or change thx.
float [][] Mpos = new float [4][2];
if (enemyexit == true) {
for (int i = 0; i< Mpos.length; i++) {
for (int j =0; j<Mpos[i].length; j++) {
Mpos[0][0]= random(120, 150);
Mpos[0][1]= random(-150, 120);
Mpos[1][0]= random(-120, -150);
Mpos[1][1]= random(-150, 120);
Mpos[2][0]= random(-150, 150);
Mpos[2][1]= random(-120, -150);
Mpos[3][0]= random(-150, 150);
Mpos[3][1]= random(100, 120);
minicreature(mouseX+Mpos[i][0], mouseY+Mpos[i][1]);