@hkrhasleholm, Greenfoot has as command that will start the scenario from the world constructor. And resetting does work, but again starts the scenario and it is very hard (at least in this scenario) to tell that it actually was reset.
Great job
This is so awesome, can u plz tell me if there is a possibility to make the stars divided randomly into space ???
I tried the following code but it didn't change it the way I wanted it to
getImage(). fillOval(x,y,2,2);
addObject(stars[i], Greenfoot.getRandomNumber(getWidth()), getHeight()/2);
this command is three times in the world class. you have to change
the getHeight()/2 to Greenfoot.getRandomNumber(getHeight())
Thank you so much, you are a life saver, that was awesome I don't know how didn't I think about it :( I'm starting to doubt my choice to be a programmer :s
put this in the world class:
public void act()
{
for(int i = 0; i < 100; i++)
{
stars[i].move();
}
}
and remove the move(); line in the star class in the act method
A new version of this scenario was uploaded on Tue Oct 30 18:17:20 UTC 2012
@erdelf Yes I read what your wrote put we both posted at the same time, I checked what you uploaded it was only with the update location method.
@SPower: everything is fine now, thanks for your advice and sorry for bothering :s
2012/10/29
2012/10/29
2012/10/30
2012/10/30
2012/10/30
2012/10/30
2012/10/30
2012/10/30
2012/10/30
2012/10/30
2012/10/30
2012/10/30
2012/10/30
2012/10/30
2012/10/30
2012/10/30
2012/10/30
2012/10/30