?? gamemidlet.java
字號:
package com.j2medev.chapter5.game;
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
public class GameMIDlet extends MIDlet {
static GameMIDlet instance;
static Display display;
private GameScreen gameScreen;
public GameMIDlet() {
instance = this;
gameScreen = new GameScreen(false); //產生實例
display = Display.getDisplay(this);
}
protected void startApp() throws MIDletStateChangeException {
gameScreen.start();// 啟動線程
display.setCurrent(gameScreen);
}
protected void pauseApp() {
gameScreen.stop();// 停止線程
}
public void destroyApp(boolean flag) throws MIDletStateChangeException {
gameScreen.stop();// 停止線程
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -