how can I create a reference to the counter from my actor class? here is my code in the actor class. Whenever I try to run it Greenfoot keeps telling me that a non-static method "getCounter1" cannot be refernced from static context.
public void eat()
{
if(isTouching(Food.class)){
removeTouching(Food.class);
foodEaten++;
speed++;
Counter1 counter1 = SnakeWorld.getCounter1();
counter1.addScore();
SnakeWorld world=(SnakeWorld)getWorld();
world.addFood();
}
}

