examplepauseresumemidp2.java
来自「一个不错的手机游戏源代码 感兴趣的朋友可以来看看 真的很不错」· Java 代码 · 共 33 行
JAVA
33 行
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class ExamplePauseResumeMIDP2 extends MIDlet {
private Display display;
private GameScreen gameScreen;
public ExamplePauseResumeMIDP2() {
display = Display.getDisplay(this);
}
public void startApp() {
try {
this.gameScreen = new GameScreen(this);
this.gameScreen.start();
display.setCurrent(this.gameScreen);
} catch (Exception ex) {
System.out.println("error: " + ex);
}
}
public void pauseApp() { }
public void destroyApp(boolean unconditional) {
gameScreen.autoSave();
}
public void exitGame() {
destroyApp(false);
notifyDestroyed();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?