petgame.java
来自「一个类似电子宠物的游戏`对需要做这类游戏的人有帮助`」· Java 代码 · 共 37 行
JAVA
37 行
package Petgame;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Petgame
extends MIDlet {
private static Petgame instance;
private PlayCanvas displayable = new PlayCanvas();
/** Constructor */
public Petgame() {
instance = this;
}
/** Main method */
public void startApp() {
Display.getDisplay(this).setCurrent(displayable);
}
/** Handle pausing the MIDlet */
public void pauseApp() {
}
/** Handle destroying the MIDlet */
public void destroyApp(boolean unconditional) {
}
/** Quit the MIDlet */
public static void quitApp() {
instance.destroyApp(true);
instance.notifyDestroyed();
instance = null;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?