I just joined this forum, I've been learning Processing for about 3 months. I'm currently working on a Space Invaders clone, and I'm having trouble with the code that makes the "aliens" reverse direction when they reach the ends of the screen. Currently I am using code that will get the individual "alien" to reverse direction and move down. But what I ultimately want is for ALL of the members of the "alien" array to switch directions and move down when this happens. How do you set things up so that an individual member of an array can affect all members?
For reference, the code for when enemies change direction looks like this: