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

📄 supermario.java

📁 游戏超级玛丽的源码
💻 JAVA
字号:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class supermario extends MIDlet
{
	private MainMenu menu;
	private GameScreen gameScreen;
	private ScoreScreen scoreScreen;
	private InfoScreen infoScreen;
	private Display display;
	
	public supermario()
	{
		display=Display.getDisplay(this);
		menu=new MainMenu(this);
	}
	public void gameOver()
	{
		Alert alert=new Alert("","Splat!Game Over",null,AlertType.INFO);
		display.setCurrent(alert,menu);
	}
	public void close()
	{
		try
		{
			destroyApp(true);
			notifyDestroyed();
		}catch(MIDletStateChangeException e)
		{}
	}
	public void startApp() throws MIDletStateChangeException
	{
		display.setCurrent(menu);
	}
	public void pauseApp()
	{
	}
	public void destroyApp(boolean unconditional) throws MIDletStateChangeException
	{
	}
	public void activateGameScreen()
	{
		gameScreen=new GameScreen(this);
		display.setCurrent(gameScreen);
	}
	public void activateInfoScreen()
	{
		infoScreen=new InfoScreen(this);
		display.setCurrent(infoScreen);
	}
	public void activateScoreScreen()
	{
		scoreScreen=new ScoreScreen(this);
		display.setCurrent(scoreScreen);
	}
	public void activateMenuScreen()
	{
		menu=new MainMenu(this);
		display.setCurrent(menu);
	}
}
	

⌨️ 快捷键说明

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