Improved checking for player's gravity direction.
Now using an enum called Direction.
The improvement solved a bug in jumping.