📄 fugitivegame.java
字号:
package Src;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.lcdui.*;
public class FugitiveGame extends MIDlet {
private Display display;
public static int Gametime;//全类静态变量获取游戏时间
public FugitiveGame() {
Gametime=0;
display=Display.getDisplay(this);
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
protected void pauseApp() {
// TODO Auto-generated method stub
}
public void help()//帮助
{
Help help=new Help(this);
display.setCurrent(help);
}
public void BestTime()//游戏记录
{
Besttime besttime=new Besttime(this);
display.setCurrent(besttime);
}
public void back()//返回主菜单
{
GameChoice GameChoice=new GameChoice(this);
new Thread(GameChoice).start();
display.setCurrent(GameChoice);
}
public void Start()//游戏开始
{
Gamestart Game=new Gamestart(20,this);
Game.start();
display.setCurrent(Game);
}
public void GameStop()//游戏停止
{
GameOver GameStop=new GameOver(this,Gametime);
display.setCurrent(GameStop);
}
protected void startApp() throws MIDletStateChangeException {
GameChoice Game=new GameChoice(this);
new Thread(Game).start();
display.setCurrent(Game);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -