In my game, when the character’s position is 0 or less, he cant move left (left edge of the game)
My code works when he is walking on ground level (he cant move left when reach edge), but when character is jumping, in the air, then he can MOVE left. i dont know why this happens
my code:
if(key == Event.LEFT)
{
if(quix.getXposLeft()<=0)
{
quix.isWalkingLeft(false);
quix.isFaceLeft(true);
}
}
........................
else if (key == Event.UP)
{
if(!quix.getJumpLock())
quix.isJumping(true);
}