Hello!
I am working in a minigame based in StarCastle(Vectrex), and i am trying to draw the shields:
void drawLines(){
for(ArrayList<PVector> line : this.shield){
switch(this.shield.indexOf(line)){
case 0: stroke(255,0,0); break;
case 1: stroke(255,255,0); break;
case 2: stroke(0,255,0); break;
}
for(PVector miniShield : line){
int iMiniShield = line.indexOf(miniShield);
if(iMiniShield>0){
PVector LastMiniShield = line.get(iMiniShield-1);
strokeWeight(3-line.get(iMiniShield).z);
if(line.get(iMiniShield).z>0)
line(miniEscudo.x, miniEscudo.y, miniEscudoAnterior.x, miniEscudoAnterior.y);
}
}
}
}
this.Shield is an ArrayList that has 3 ArrayLists with 8 PVectors.
My problem is that I always get 0 when I use.indexOf(), what am I doing wrong?