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

📄 beatbrick.java

📁 由J2ME开发的能在NOKIA S40上运行的手机游戏!开发者:徐巍!qq:18793815
💻 JAVA
字号:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.io.IOException;
public class BeatBrick extends MIDlet
{
  private static BeatBrick theApp;
  private MainMenu menu;
  private GameScreen gameScreen;
  private Splash splash;
  private GameOver gameover;
  private boolean ingame;
  private int level;
  private int score;
 
  public BeatBrick()
  {
    theApp=this;
    splash=new Splash(this);
  }

  public void close()
  {
     try{
          destroyApp(true);
          notifyDestroyed();
         }
     catch(MIDletStateChangeException e){}
  }

  public void activateGameScreen()
  {
    gameScreen=new GameScreen(this);
    Display.getDisplay(this).setCurrent(gameScreen);
  }
  
  public void activateMainMenu()
  {
    menu=new MainMenu(this);
    Display.getDisplay(this).setCurrent(menu);
  }
  
  public void activateGameOver(boolean i,int l,int s)
  {
    ingame=i;
    level=l;
    score=s;
    gameover=new GameOver(this,ingame,level,score);
    Display.getDisplay(this).setCurrent(gameover);
  }

  public void startApp() throws MIDletStateChangeException
  {
    Display.getDisplay(this).setCurrent(splash);
  }
  
  public static BeatBrick getApp()
  {
    return theApp;
  }
  
  public static void activateDisplayable(Displayable s)
  {
    Display.getDisplay(getApp()).setCurrent(s);
  }
  public void pauseApp(){}

  public void destroyApp(boolean unconditional) throws MIDletStateChangeException{}
}

⌨️ 快捷键说明

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