Opposite of while?
So, I was working with the collision detection in my game and something came up -
I had to change an if statement to an while statement. Simplified code follows:
if(colision) while(colision)
{ {
player.y -=5; player.y -=5;
playerColided = true; playerColided = true;
} ------------> }
else ???
{ {
playerColided = false; playerColided = false;
} }
Once I changed to while, I could not find something to do the "else" role, like "while not" or something like that, in a manner that while the while statement is not active, the playerColided Boolean becomes false. Is there an statement that can do this?
Thanks in advance, Dan.