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

📄 m3gmidlet.java

📁 第一人称视角室内漫游 其具有强烈的视觉冲击效果与身临其境的切实感受
💻 JAVA
字号:
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class M3GMidlet extends MIDlet implements CommandListener
{
	private Display display = null;
	// 定义3D画布
	private M3GCanvas canvas = null;
	private static MIDlet self = null;

	protected void startApp() throws MIDletStateChangeException
	{
		display = Display.getDisplay(this);
		canvas = new M3GCanvas(30);
		canvas.addCommand(new Command("Quit", Command.EXIT, 1));
		canvas.setCommandListener(this);
		//调用绘制的启动方法
		canvas.start();
		display.setCurrent(canvas);
		self = this;
	}

	protected void pauseApp()
	{
		
	}

	protected void destroyApp(boolean unconditional) throws MIDletStateChangeException
	{
		notifyDestroyed();
	}

    public void commandAction(Command c, Displayable d) {
        if(c.getCommandType() == Command.EXIT)
            notifyDestroyed();
    }

    public static void die()
    {
        self.notifyDestroyed();
    }
}

⌨️ 快捷键说明

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