How to create a score counter?? in my counter.class i wrote
import greenfoot.*;
import java.awt.Color;
public class Counter extends Actor
{
int score = 0;
public void act()
{
setImage(new GreenfootImage("Score : " + score, 24, Color.BLUE, Color.GREEN));
}
public void addScore()
{
score++;
}
}
but its not working.
???????????????????????????

