Esempio n. 1
0
  @Override
  public boolean onMenuItemClicked(
      MenuScene pMenuScene, IMenuItem pMenuItem, float pMenuItemLocalX, float pMenuItemLocalY) {
    // TODO Auto-generated method stub
    switch (pMenuItem.getID()) {
      case MENU_PLAY:
        mainMenuScene.registerEntityModifier(new ScaleModifier(1.0f, 1.0f, 0.0f));
        mStaticMenuScene.registerEntityModifier(new ScaleModifier(1.0f, 1.0f, 0.0f));
        mHandler.postDelayed(mLaunchLevel1Task, 1000);
        return true;

      case MENU_OPTIONS:
        mainMenuScene.registerEntityModifier(new ScaleModifier(1.0f, 1.0f, 0.0f));
        mStaticMenuScene.registerEntityModifier(new ScaleModifier(1.0f, 1.0f, 0.0f));
        mHandler.postDelayed(mLaunchOptionsTask, 1000);
        return true;

      case MENU_HELP:
        mHandler.postDelayed(mLaunchHelp, 1000);
        return true;

      default:
        return false;
    }
  }
Esempio n. 2
0
  @Override
  public synchronized void onResumeGame() {
    // TODO Auto-generated method stub

    // sa.finish();
    super.onResumeGame();
    mainMenuScene.registerEntityModifier(
        new ScaleAtModifier(0.5f, 0.0f, 1.0f, CAMERA_WIDTH / 2, CAMERA_HEIGHT / 2));
    mStaticMenuScene.registerEntityModifier(
        new ScaleAtModifier(0.5f, 0.0f, 1.0f, CAMERA_WIDTH / 2, CAMERA_HEIGHT / 2));

    if (audioOptions.getBoolean("musicOn", true)) {
      StartActivity.mMusic.resume();
    }
  }