Hi everyone! We have a code for actors which fall down, i will place the code downhere. The problem is that we also need a code, the 'while' code, for more actors than the 'bal' actors, because we have more different balls that need to fall down. These actors are called 'one' and 'two' etc. So our question is, how do we write a code for these actors?
//fall down
while (!isTouching(Bal.class) && getY() < getWorld().getHeight() - 1)
{
setLocation(getX(), getY()+1);
}
setLocation(getX(), getY()-1);
active = false;
((SpeelVeld) getWorld()).spawnNewBal();