I am trying to have the background color change based on which position of the array the timer is at--I want it to alternate between red and green based- I have an if statement that isnt working, it says || is undefined in a boolean and also that my timerData[] cannot be converted from an int. Please Help!
I am unsure why when it runs the first time all the rectangles are on top of each other and then they separate the second time through. Also why are my vertical rectangles not move?!
I also want all of the rectangles to stay on the screen instead of all disappearing when the timer starts over, I am new at this and don't know how to have that happen.
Thanks in advance
Timer_Car timer_Car;
Car[] horizontalCar;
Car[] verticalCar;
int totalHorizontalCar = 0;
int totalVerticalCar = 0;
void setup() {
size(600, 600);
smooth();
timer_Car = new Timer_Car(6000);
timer_Car.start();
horizontalCar = new Car[50];
verticalCar = new Car [20];
for(int i = 0; i < horizontalCar.length; i ++){
horizontalCar[i] = new Car(color(random(255), random(255), random(255)), 0, i*2, i/20);
}
for(int j = 0; j < verticalCar.length; j ++){
verticalCar[j] = new Car(color(random(255), random(255), random(255)),j*2, 0, j/20);
It says it cannot find my class- its there so I don't know what to do. And also, I removed that problem to see if the rest would run and it also said it HorizontalCar was undefined.
Please help! and thanks in advance
Timer_Car timer_Car;
HorizontalCar[] horizontalCar;
VerticalCar[] verticalCar;
int totalHorizontalCar = 0;
int totalVerticalCar = 0;
void setup() {
size(600, 600);
smooth();
//horizontalCar = new HoriztonalCar[200];
//verticalCar = new VerticalCar[100];
timer_Car = new Timer_Car(200);
timer_Car.start();
for(int i = 0; i < horizontalCar.length; i ++){
horizontalCar[i] = new HorizontalCar(color(random(255), random(255), random(255)), 0, i*2, i/20);
}
for(int j = 0; j < verticalCar.length; j ++){
verticalCar[j] = new verticalCar(color(random(255), random(255), random(255)),j*2, 0, j/20);
}
}
void draw() {
background(255);
if(timer_Car.isFinished()){
horizontalCar[totalHorizontalCar] = new HorizontalCar();
totalHorizontalCar ++;
verticalCar[totalVerticalCar] = new VerticalCar();
totalVerticalCar ++;
if(totalHorizontalCar >= horizontalCar.length){
totalHorizontalCar = 0;
}
if(totalVerticalCar >= verticalCar.length){
totalVerticalCar = 0;
}
timer_Car.start();
}
for (int i = 0; i < horizontalcar.length; i ++ ) {
I want to create a processing sketch using data from my cell phone via the at&t website. It would be my own username and password. I am wondering if processing would be able take a password and enter a website to gather data