Alright, so basically I'm trying to change the value of multiple actors through world, but I'm having trouble: it won't let me call custom methods without using this prefix (I think): (()).shadowImagery(shadowImagery);
If someone could help me, that would be great because I have no idea what do to about this
//Shadow Imagery
if (Greenfoot.isKeyDown("s")&&sdown==false){
if (shadowImagery==false){shadowImagery=true;}else{shadowImagery=false;}
sdown=true;
updateShadowImagery();
}else if (! Greenfoot.isKeyDown("s")){sdown=false;}
}
Class[] shadowers = {Ball.class};
public void updateShadowImagery(){
for (int i=0; i<shadowers.length; i++){
List Shadowers = getObjects(shadowers[i]);
if (! Shadowers.isEmpty()){
for (int s=0; s<Shadowers.size(); s++){
Actor shadower = (Actor) Shadowers.get(s);
shadower.shadowImagery(shadowImagery);
}
}
}
}



