gamemidlet.java~2~

来自「Source code of J2ME game called Action S」· JAVA~2~ 代码 · 共 47 行

JAVA~2~
47
字号
package com.soccer;

import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;

public class GameMidlet extends MIDlet
{

    public GameMidlet()
    {
        midlet = this;
        m_display = Display.getDisplay(this);
        if(getAppProperty("RoundTime") != null)
            roundTime = Integer.parseInt(getAppProperty("RoundTime"));
        gameScreen = new GameScreen();
        menuScreen = new MenuScreen(this);
        m_display.setCurrent(menuScreen);
    }

    public void startApp()
    {
    }

    public void pauseApp()
    {
    }

    public void destroyGame()
    {
        destroyApp(false);
        notifyDestroyed();
    }

    protected void destroyApp(boolean flag)
    {
        Display.getDisplay(this).setCurrent(null);
    }

    public static Display m_display;
    public static GameScreen gameScreen;
    public static MenuScreen menuScreen;
    public static boolean stopGame = false;
    public static MIDlet midlet = null;
    public static int roundTime = 90;

}

⌨️ 快捷键说明

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