gamemidlet.java

来自「一个经典的手机游戏原代码」· Java 代码 · 共 49 行

JAVA
49
字号

import java.io.IOException;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: </p>
 * @author not attributable
 * @version 1.0
 */

public class gameMIDlet extends MIDlet {
  Display display;
  Image corLogo;
  Image gameLogo;
  boolean isSplash = true;

  menuScreen menu;

  public gameMIDlet() {
  }

  protected void startApp() throws javax.microedition.midlet.MIDletStateChangeException {
    /**@todo Implement this javax.microedition.midlet.MIDlet abstract method*/
    display = Display.getDisplay(this);
    if (isSplash) {
      isSplash = false;
      try {
        gameLogo = Image.createImage("/res/gameLogo.png");
        corLogo = Image.createImage("/res/corLogo.png");
        menu = new menuScreen(display, gameLogo, this);
        new splashScreen(display, menu, corLogo, 800);
      } catch (Exception exp) {}
    }
  }

  protected void pauseApp() {
    /**@todo Implement this javax.microedition.midlet.MIDlet abstract method*/
  }

  public void destroyApp(boolean parm1) {
    /**@todo Implement this javax.microedition.midlet.MIDlet abstract method*/
    System.gc();
  }

}

⌨️ 快捷键说明

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