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

📄 examplepauseresumemidp1.java

📁 j2me游戏开发 源代码
💻 JAVA
字号:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class ExamplePauseResumeMIDP1 extends MIDlet {
 private Display display; 
 
 private GameCanvas gameCanvas;  

 public ExamplePauseResumeMIDP1() {
  display = Display.getDisplay(this);   
 }

 public void startApp() {
   try {
     this.gameCanvas = new GameCanvas(this);
     this.gameCanvas.start();
     display.setCurrent(this.gameCanvas);
   } catch (Exception ex) {
     System.out.println("error: " + ex);	
   }
 }

 public void pauseApp() {  }
 public void destroyApp(boolean unconditional) {  
   gameCanvas.autoSave();
 }
 
 public void exitGame() {
   destroyApp(false);
   notifyDestroyed(); 	
 }
}

⌨️ 快捷键说明

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