This site requires JavaScript, please enable it in your browser!
Greenfoot back
DillonCummings
DillonCummings wrote ...

2012/10/22

Title Screen

DillonCummings DillonCummings

2012/10/22

#
Hi, I want to make a title screen for a tic tac toe game i'm making, but I don't know the specifics of it. I know you need to make the title screen as a world class and then refer to an actor, but how?
danpost danpost

2012/10/22

#
Actually, there are other ways of doing it. For a tic tac toe game, pretty much any way would work, because it is a move-based game. It really makes no difference whether the title screen is the background of a different world or just an object that covers the current world (which I myself would prefer). The scenario can be running or waiting to be started while the title screen is up (which I prefer, as the user has to do something to remove the object anyway. Might as well be starting the scenario). You can use the 'started' method to remove the TitleScreen object. This method is automatically run when the user starts the scenario.
public void started()
{
    removeObjects(getObjects(TitleScreen.class));
}
Hope this helps. Just create the 'TitleScreen' class, set the image, or programatically create one, and add code in the world class to add it to the world.
DillonCummings DillonCummings

2012/10/23

#
Thanks!
DoctorrBoss DoctorrBoss

2014/1/9

#
ASAP. Need Help Now! When I copy and paste the method which danpost wrote, it keeps on saying: cannot find symbol- method getObjects (java.lang.Class<Header>) What do I do to remove the error?
DoctorrBoss DoctorrBoss

2014/1/9

#
Oh no, wait, sorted it out. Didn't put code into the world :/
You need to login to post a reply.