示例#1
0
  @Override
  protected void onResume() {

    super.onResume();

    Log.d(
        Game.class.getName(),
        "Resume [creating, paused, finished, timerTime] "
            + creating
            + " "
            + paused
            + " "
            + finished
            + " "
            + timer.getElapsedTime());

    if (!creating) {
      if (fieldCreationFragment.getZahlenschlange() == null) {

        createGame();
      } else if (!paused && finished == GAME_FINISHED_NOT_YET) {

        startGame();
      } else {

        updateGridView();
      }
    }
  }
示例#2
0
  @Override
  protected void onStart() {

    super.onStart();

    requestFullscreen(true, false, false, false);
  }
示例#3
0
  @Override
  protected void onRestoreInstanceState(Bundle savedInstanceState) {

    super.onRestoreInstanceState(savedInstanceState);

    restoreElapsedTime(savedInstanceState);
    restoreGameState(savedInstanceState);
    restoreClickCount(savedInstanceState);
  }
示例#4
0
  @Override
  protected void onSaveInstanceState(Bundle outState) {

    hideLoadingDialog();
    hideCenteredFullScreenDialog();

    super.onSaveInstanceState(outState);

    saveElapsedTime(outState);
    saveGameState(outState);
    saveClickCount(outState);
  }
示例#5
0
  @Override
  protected void onRestart() {

    super.onRestart();

    if (creating) {

      showLoadingDialog();
    } else if (finished == GAME_FINISHED_NOT_YET) {

      pauseGame();
    }
  }
示例#6
0
  @Override
  protected void onPause() {

    Log.d(
        Game.class.getName(),
        "Pause [creating, paused, finished, timerTime] "
            + creating
            + " "
            + paused
            + " "
            + finished
            + " "
            + timer.getElapsedTime());

    super.onPause();

    timer.stop();
  }
示例#7
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    paused = false;
    creating = false;
    finished = GAME_FINISHED_NOT_YET;

    noTitle();
    lockScreenshots();
    setContentView(R.layout.activity_game);

    fetchGUIElements();
    fetchExtras();
    fetchFieldCreationFragment();

    setTimer(new Timer(101));

    setGridToSize(difficulty);
    setTimerTime(0);
    setClickCount(0);
  }
示例#8
0
  @Override
  public void finish() {

    updateResult();
    super.finish();
  }
示例#9
0
  @Override
  protected void onDestroy() {

    super.onDestroy();
  }
示例#10
0
  @Override
  protected void onStop() {

    super.onStop();
  }