//I am creating a pacman game.(Sorta). I want the pixel to disappear after it touched the pacman. I wrote some code to do this bu tit is not working. Can someone please help me?
public void act()
{
checkKeys();
if(getOneIntersectingObject(Pacman.class)!=null)
{
Actor Pixel=getOneIntersectingObject(Pacman.class);
getWorld().removeObject(Pixel);
getWorld().removeObject(this);
}
}
