Hi! I'm new to Greenfoot and I need help!
I am making a game where a bee (actor name is Bee) eats food (apple but the actor name is Food). When the Food runs out, I want to make a "You Win!" screen. I made an actor under the Actor Class named "FinalScreen". How do I make it appear when the food is all gone? By gone, I mean removed from the world.
I placed this under the MyWorld class
public void youWin()
{
if (getObjects(Food.class).isEmpty())
{
addObject(FinalScreen.class,313,206);
}
}
but the ".class" portion of (FinalScreen.class) is underlined in red saying "incompatible types: java.lang.Class<FinalScreen> cannot be converted to greenfoot.Actor"
Please Help!

