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

2013/10/30

Game Over

Mar_Om Mar_Om

2013/10/30

#
Hello, I'm trying to adjust the color and font of the string on the World. Here is what I've got so far. Tanks
import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.awt.Color;
/**
 * Write a description of class Crab here.
 * 
 * @author (-----) 
 * @version (a version number or a date)
 */
public class Crab extends World
{
public Crab()
 // Create a new world with 400x400 cells with a cell size of 1x1 pixels.

public void gameOver()
   {
     getBackground().drawString("Game Over", getWidth() / 2 , getHeight() / 2);
          Greenfoot.stop();
   }
}
You need to login to post a reply.