So, I'm making CTF (capture the flag) game, and I ran into an issue. I made these walls, and I have it so that if a player touches it, they can't get through. The issue is, I can't figure out to make this work two ways. Here's the code so far
I need to find a way to make an 'and' in the if statement saying that if the player is already moving at a negative value, the move becomes 10 in the else statement. Thank you for your help!
public void hitWall()
{
if(isTouching(wall.class))
{
move(-10); //The base move is 5
}
}