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

2011/12/22

score board?

programmer22 programmer22

2011/12/22

#
how to make a score counter like at the corner when you eat something?
Royalblue64 Royalblue64

2011/12/22

#
If you want a score counter in the corner of your screen, you will have to have some sort of class acting as a scorekeeper (known as a counter). You will have to create one in the world, but not the usual way if you want more than one counter. I will assume that you want to be able to make as many counters as you want. in your world class, use something like this: public MyWorld() { public Counter scoreKeeper = new Counter( "some string of your choice" ); addObject(new scoreKeeper, x coordinate, y coordinate); } public Counter getScoreKeeper() { return scoreKeeper; } I also suggest however that you check out Michael Kolling's Counter class if you can find it.
programmer22 programmer22

2011/12/22

#
where can i get a picture for a counter and some string of your choice? >.> sorry new at this
You need to login to post a reply.