Esempio n. 1
0
 public void restartGame() {
   removeMap();
   m_progress_bar.reset();
   m_progress_bar.start();
   removeList.clear();
   _score.reset();
   createGame();
 }
Esempio n. 2
0
 private void createProgressBar() {
   // TODO Auto-generated method stub
   m_progress_bar =
       new ProgressBar(
           GameActivity.getCameraWidth() / 2,
           (int) (0.95 * GameActivity.getCameraHeight()),
           m_resource_manager.m_progress_region,
           m_vbom,
           square_size * grid_size);
   m_progress_bar.setTotalTime(Constant.TOTAL_TIME);
   m_progress_bar.start();
 }
Esempio n. 3
0
  public void levelChange() {

    initSize();
    m_progress_bar.setTotalTime(Constant.TOTAL_TIME);
    _score.setLevel(_level);
    _score.reset();
    removeList.clear();
    m_game_state.setSize(grid_size);
    createGame();
    NumSprite.istouchable = true;
    m_progress_bar.resume();
  }
Esempio n. 4
0
 public void quitGame() {
   NumSprite.istouchable = false;
   removeMap();
   removeList.clear();
   m_progress_bar.stop();
   System.exit(0);
 }
Esempio n. 5
0
 @Override
 public void disposeScene() {
   m_camera.setHUD(null);
   m_camera.setCenter(GameActivity.getCameraWidth() / 2, GameActivity.getCameraHeight() / 2);
   removeMap();
   removeList.clear();
   m_progress_bar.stop();
   this.detachSelf();
   this.dispose();
 }
Esempio n. 6
0
  public void onTouchMovable(NumSprite sprite) {
    NumSprite.istouchable = false;
    Point p0 = m_game_state.getZeroPxPy();
    Point p1 = new Point();
    p1.set(sprite.getPx(), sprite.getPy());

    // toogle 2 sprite
    toogle(p0, p1);
    // update game_state
    updateGameState(sprite);
    //	m_game_state.showMatrix2D();
    // Check if archive target
    if (isArchive()) {
      if (sound_on) m_resource_manager.sound.playArchive();
      m_progress_bar.pause();
      processArchivement();

    } else {
      NumSprite.istouchable = true;
    }
    return;
  }
Esempio n. 7
0
 public void resumeGame() {
   m_progress_bar.resume();
   NumSprite.istouchable = true;
 }
Esempio n. 8
0
 public void pauseGame() {
   m_progress_bar.pause();
   NumSprite.istouchable = false;
 }