You could change the text for the button to read " Click here to \n TRY AGAIN ".
public void getEaten() { // Code for sound (if you want) // Code to remove crab (if you want) CrabWorld gw = (CrabWorld) getWorld(); ScoreBoard scoreboard = new ScoreBoard(counter.getValue()); gw.addObject(scoreboard, 273, 302); gw.removeObject(this); return; }
if (getObjects(Crab.class) == null) { if (getObjects(Scoreboard.class) == null) addObject(new Scoreboard(), xSb, ySb); // replace xSb and ySb if (getObjects(Button.class) == null) addObject(new Button(), xBt, yBt); // replace xBt and yBt return; }
public void getEaten() { CrabWorld gw = (CrabWorld) getWorld(); gw.removeObject(this); }
public void act() { addWorms(20); if (getObjects(Crab.class) == null) { if (getObjects(Button.class) == null) addObject(new Button(), getWidth()/2, getHeight()/2); return; } }
public void getEaten() { // Code for sound (if you want) // Code to remove crab (if you want) CrabWorld gw = (CrabWorld) getWorld(); ScoreBoard scoreboard = new ScoreBoard(counter.getValue()); gw.addObject(scoreboard, 273, 302); gw.removeObject(this); return; }
public void prepare() { removeObjects(getObjects(null)); addObject(new Crab(), xC, yC); addObject(new Lobster(), xL, yL); addWorms(20); counter = new Counter(); addObject(counter, xK, yK); // if I missed anything, add them also }
if (getObjects(Worm.class).size() < 5) addWorms(20);