⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gamemidlet.java

📁 一个J2ME编译的打地鼠小游戏,供初学者学习
💻 JAVA
字号:
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;


public class GameMidlet extends MIDlet {
	private GameScreen gs = null;
	
	protected void destroyApp(boolean arg0){

	}

	protected void pauseApp() {
        GameScreen.phoneIn();
	}

	protected void startApp() throws MIDletStateChangeException {
		ActivateGameScreen(this);
	}
    
	/**
	 * 启动游戏
	 * @param gameMidlet
	 */
	private void ActivateGameScreen(GameMidlet gameMidlet) {
		if(gs==null)
		    gs = new GameScreen(gameMidlet);
		Display.getDisplay(this).setCurrent(gs);
	}
	
	/**
	 * 退出程序
	 */
	void Quit(){
	    notifyDestroyed();
	    destroyApp(true);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -