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

📄 msf.java

📁 街头霸王格斗类游戏源码和素材
💻 JAVA
字号:


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

public class msf extends MIDlet
    implements CommandListener
{

    public static Display display;
    public static MapCanvas mc;
    public static Command CommandPlay;
    public static Command CommandExit;

    public msf()
    {
    }

    public void startApp()
    {
        CommandPlay = new Command("Play", 1, 1);
        CommandExit = new Command("Exit", 1, 2);
        mc = new MapCanvas();
        mc.addCommand(CommandPlay);
        mc.addCommand(CommandExit);
        mc.setCommandListener(this);
        mc.init();
        display = Display.getDisplay(this);
        display.setCurrent(mc);
    }

    public void sleep(int i)
    {
        try
        {
            Thread.sleep(i);
        }
        catch(Exception exception) { }
    }

    public void commandAction(Command command, Displayable displayable)
    {
        if(command == CommandExit)
        {
            notifyDestroyed();
            return;
        }
        if(command == CommandPlay)
        {
            if(MapCanvas.mode == 0)
            {
                mc.removeCommand(CommandPlay);
                mc.removeCommand(CommandExit);
                Intro intro = new Intro();
                intro.start();
                MapCanvas.mode = 1;
            } else
            {
                mc.F3 = 0;
                mc.FA = 0;
                mc.FC = false;
                mc.FF.reset();
                mc._fld0100.reset();
                mc._fld0101 = 100;
                mc._fld0102 = 100;
                MapCanvas.still = false;
                mc.repaint();
            }
            return;
        } else
        {
            return;
        }
    }

    public void pauseApp()
    {
    }

    public void destroyApp(boolean flag)
    {
    }
}

⌨️ 快捷键说明

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