I am trying to get my actor eat this Gold. In order to score points but theres syntax error. PLs help check my code if there is any mistake
under public void act
if (isTouching(Gold.class))
{
get(Gold.class);
}


if (isTouching(Gold.class)!=null) { removeTouching(Gold.class); }
if (isTouching(Gold.class)) // OR if (isTouching(Gold.class) == true)
Gold gold = (Gold)getOneIntersectingObject(Gold.class);
getWorld().removeObject(gold);
if (isTouching(Gold.class)) removeTouching(Gold.class);
if (isTouching(Gold.class)) { removeTouching(Gold.class); // whatever else needs done -- like 'bumpScore();' }
getWorld().removeObject(this);