I have my actor trying to "eat" its gold and the score adds to one, but its not working. please help me!!!! very urgent.
/**
* Act - do whatever the Crosser wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
eat();
}
}
public void eat()
{
Actor gold;
gold = getOneIntersectingObject(Gold.class);
if (gold != null)
{
World myWorld = getWorld();
myWorld.removeObject(gold);
RoadWorld RoadWorld = (RoadWorld)myWorld;
Counters Counters = RoadWorld.getCounters();
Counters.addScore();
RoadWorld.removeObject(this);
}
}
The problems are occuring on my actor crosser. My counter world class has no problem.