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

2011/12/30

fixing my score board

1
2
3
MultiplayerBanana MultiplayerBanana

2012/9/17

#
I didn't make that code, i just got it from a friend of mine... He said to me that it would work, and it did... Here's an example of how to make the code work...
public void killCannon()
{
if (Space.cannonLife == 5)
{
    Greenfoot.stop();
    Space.cannonLife = 0;
    Greenfoot.playSound("cdie.wav");
    ScoreBoard s = new ScoreBoard(); //Means that "s" = ScoreBoard
    getWorld().addObject(s, getX(), getY()-390); //Gets the ScoreBoard to pop up when the "Cannon" Dies...
}
}
You need to login to post a reply.
1
2
3