beatbrick.java
来自「由J2ME开发的能在NOKIA S40上运行的手机游戏!开发者:徐巍!qq:18」· Java 代码 · 共 68 行
JAVA
68 行
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.io.IOException;
public class BeatBrick extends MIDlet
{
private static BeatBrick theApp;
private MainMenu menu;
private GameScreen gameScreen;
private Splash splash;
private GameOver gameover;
private boolean ingame;
private int level;
private int score;
public BeatBrick()
{
theApp=this;
splash=new Splash(this);
}
public void close()
{
try{
destroyApp(true);
notifyDestroyed();
}
catch(MIDletStateChangeException e){}
}
public void activateGameScreen()
{
gameScreen=new GameScreen(this);
Display.getDisplay(this).setCurrent(gameScreen);
}
public void activateMainMenu()
{
menu=new MainMenu(this);
Display.getDisplay(this).setCurrent(menu);
}
public void activateGameOver(boolean i,int l,int s)
{
ingame=i;
level=l;
score=s;
gameover=new GameOver(this,ingame,level,score);
Display.getDisplay(this).setCurrent(gameover);
}
public void startApp() throws MIDletStateChangeException
{
Display.getDisplay(this).setCurrent(splash);
}
public static BeatBrick getApp()
{
return theApp;
}
public static void activateDisplayable(Displayable s)
{
Display.getDisplay(getApp()).setCurrent(s);
}
public void pauseApp(){}
public void destroyApp(boolean unconditional) throws MIDletStateChangeException{}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?