📄 tankmidlet.java
字号:
/**
* <p>Title: Transpanzer</p>
* <p>Description:
* You cannot remove this copyright and notice.
* You cannot use this file any part without the express permission of the author.
* All Rights Reserved</p>
* @author Jjyo
* @email jjyo@163.com
* @version 1.0.0
*/
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import GetCanvas;
import ProgressThread;
public class TankMIDlet extends MIDlet implements GetCanvas {
static public TankGameCanvas gameCanvas;
public ProgressThread gameLoading;
public TankMIDlet() {
gameLoading = new ProgressThread(this);
}
public void startApp() {
if (gameLoading.loadProgressIsOver) {
Display.getDisplay(this).setCurrent(gameLoading);
gameCanvas.start();
} else {
Display.getDisplay(this).setCurrent(gameLoading);
gameLoading.start();
if (gameLoading.gaugeCnt == 0) {
gameCanvas = new TankGameCanvas(this);
}
}
}
public Canvas getCanvas() {
return gameCanvas;
}
public void pauseApp() {
if (gameLoading.loadProgressIsOver) {
gameCanvas.stop();
} else {
gameLoading.stop();
}
}
public void destroyApp(boolean unconditional) {
if (gameLoading.loadProgressIsOver) {
gameCanvas.stop();
}
}
public void exitMIDlet() {
destroyApp(false);
notifyDestroyed();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -