Hi, my game allows the user to control the bear as they try to eat fish. Here's the code for the collision which shows an error code.
The error code is "Can't find symbol - variable getWorld". I'm aware that the issue lies with the bold line, I don't actually know what it's supposed to do but I remember it was necessary in another game I made. Any help would be greatly appreciated!
public void checkCollision()
{
Actor foodHit = getOneIntersectingObject(bear.class);
if(foodHit!=null)
{
World myWorld = getWorld();
river river = (river)myWorld;
counter counter = river.getCounter();
counter.addScore();
[b]timer timer = (timer)getWorld;[/b]
timer.addTime();
myWorld.removeObject(this);
}