This is my scenario http://www.greenfoot.org/scenarios/20778
I cant make it reset after i hit reset on greenfoot
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class World_30 here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class World_30 extends World
{
/**
* Constructor for objects of class World_30.
*
*/
private static int score=0;
public World_30()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(1500, 800, 1);
score=0;
bumpScore();
addObject(new thirty_seconds(),120,90);
addObject(new Score30(),400,700);
addObject(new Circle(),750,450);
addObject(new Timer30(),400,750);
///// TIMER TIMER TIMER
}
void bumpScore()
{
if (Greenfoot.isKeyDown("space"))
{
score=score+1;
}
}
public static int getScore()
{
return score;
}
//** TIMER TIMER TIMER TIMER TIMER TIMER TIMER //
}
addObject(new Score30(),400,700);