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

2013/6/1

alert

1
2
3
danpost danpost

2013/6/3

#
What is wrong with the counter? What is it, that it is (or is not) doing, that is not what you want, and what is it that you want? I appears to me that it is increasing by increments of 5 when a block it hit.
landry landry

2013/6/3

#
but how can i display the final score once the game has ended , i have a score board but i'm confused with them since it's my first time to use both of them at the same time. But you know i really need to know how to use them for the future if you see what i mean .
danpost danpost

2013/6/3

#
Where (or when) do you want it to appear? while the JPanel is up? or over Einstein? or elsewhere?
landry landry

2013/6/3

#
Before Einstein. Plz
danpost danpost

2013/6/3

#
The big problem I am encountering is with your JOptionPane. I have read that it is not thread-safe, and I do not know if the problem I am getting is due to that issue or not; but, it is messing with the graphics in such a way as to make the scoreboard object not readable. I will continue to work with it, hopefully to find a way around the issue.
landry landry

2013/6/3

#
thanks man you'll , i'm counting on you
danpost danpost

2013/6/3

#
It is not perfect, but this is what I came up with: First, from the 'checkOut' method, remove the line 'getWorld().removeObject(this);'. Then change your 'gameOver' method to the following:
public void gameOver()
{
    JOptionPane.showMessageDialog(null," You lost, nonetheless you've made a mess and has disrupted E=M(C^2)");
    Counter counter = (Counter) getWorld().getObjects(Counter.class).get(0);
    getWorld().addObject(new ScoreBoard(counter.getValue() ), getWorld().getWidth()/2, getWorld().getHeight()/2);
    Greenfoot.delay(180);
    backgroundMusic.pause();
    Greenfoot.playSound("applause.wav");
    Greenfoot.setWorld(new Over());
}
You can add an act method to the Over class to stop Greenfoot there.
landry landry

2013/6/3

#
A billion times THANK YOU MAN for all the time spent on helping me man May LORD BLESS YOU!
landry landry

2013/6/3

#
I'll upload the final scenario of the website by tomorrow i don't know the exact time but THANK YOU ONCE AGAIN!!!!!!!!!!!!!!!!!!!!!
You need to login to post a reply.
1
2
3