xxxxxxxxxx
ArrayList<Car> carros = new ArrayList<Car>();
void setup() {
size(800, 600,P3D);
int j=50;
color c2 = #ff0000;
for (int i=0; i<20; i++) {
Car myCar= new Car(c2,j);
carros.add(myCar);
j=j+10;
}
}
void draw() {
background(0);
for (int i=0; i<20; i++) {
carros.get(i).mostrar();
carros.get(i).mover();
//carros.get(i).mover2();
}
}