Hi, I'm trying to get the height of the hero from the enemy class. I've tried this but it give me a java.lang.NullPointerException:
Where have I gone wrong with it?
private void checkCollision()
{
Mario player = (Mario) getOneIntersectingObject(Mario.class);
int playerBottom = player.getImage().getHeight() / 2;
System.out.println(playerBottom);
}
