您可以在这里快速查找:


 
您的位置: 编程学习 > java教程 > 200602
文章分类

Java技术
2005: 03 04 05 06 07 08
09 10 11 12
2006: 01 02

Asp.net
2005: 07 08 09 10 11 12
2006: 01 02

VB编程
2006: 02

Asp编程
2005: 11 12
2006: 01 02

C++/VC
2005: 10 11 12
2006: 01 02

Delphi
2005: 12
2006: 01 02

其它

 本文章适合所有读者

GameOver.java---BallGame

fansy_fs

import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.game.GameCanvas;

/**
 * <strong>FileName</strong>: GameOver.java
 * <HR>
 * <strong>Description</strong>: The scene of ending game.
 * <P><HR>
 *  @author
 *  <em>
 * This Game is developed by <B>Fansy</B>.<BR>
 *  F.S.Studio 1999~2005
 *  </em>
 *  @version 0.3.2
 */

public class GameOver extends GameCanvas
{
 private Graphics g;
 
 public GameOver()
 {
  super(false);
  g=getGraphics();
 }
 
 public void showGameOver()
 {
  Display.getDisplay(BallMidlet.instance).setCurrent(this);
  g.drawString("GameOver!",100,150,20);
  this.flushGraphics();
  try{Thread.sleep(4000);}
  catch(Exception e){}
  BallMidlet.instance.quitApp();
 }
}