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

📄 roadrun.java

📁 青蛙過河~ 就是青蛙過馬路 過馬路很危險請小心... that s a
💻 JAVA
字号:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class RoadRun extends MIDlet{
   
   	private MainMenu menu;
   	
   	private GameScreen gameScreen;


   	public RoadRun(){
     	//MIDlet constructor instantiates the main menu.
      	menu = new MainMenu(this);
   	}
   	
   	public void activateGameScreen() {
   		
      gameScreen = new GameScreen(this); 
      Display.getDisplay(this).setCurrent(gameScreen);
   }
   
   //Called by the game classes to indicate to the user that the current game is over.
   	public void gameOver(){
  		
  		// Display an alert (the device will take care of implementing how to
      	// show it to the user.
      	Alert alert = new Alert("", "Splat! Game Over", null, AlertType.INFO);
      	// Then set the menu to be current.
      	Display.getDisplay(this).setCurrent(alert, menu);
   	}
   
   
   	public void close(){
   	
      	try{
        	destroyApp(true);
         	notifyDestroyed();
      	}catch (MIDletStateChangeException e){ }
   	}

   	public void startApp() throws MIDletStateChangeException{
      	Display.getDisplay(this).setCurrent(menu);
   	}

   	public void pauseApp(){
   	}

   	public void destroyApp(boolean unconditional) throws MIDletStateChangeException{
   	}

}

⌨️ 快捷键说明

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