Пример #1
0
  public void event(BombermanEvents event) {
    switch (event) {
      case KILL_MEAT_CHOPPER:
        increaseScore();
        break;
      case KILL_DESTROY_WALL:
        increaseScore();
        break;
      case KILL_BOMBERMAN:
        gameOver();
        break;
    }

    if (listener != null) {
      listener.event(event.name());
    }
  }
Пример #2
0
  /**
   * Борда может файрить ивенты юзера с помощью этого метода
   *
   * @param event тип ивента
   */
  public void event(Events event) {
    switch (event) {
      case CATCH_BOMB:
        gameOver();
        break;
      case CATCH_GOLD:
        increaseScore();
        break;
      case CATCH_SHIT:
        decreaseScore();
        break;
    }

    if (listener != null) {
      listener.event(event);
    }
  }
Пример #3
0
 private void fire(MinesweeperEvents event) {
   if (listener != null) {
     listener.event(event);
   }
 }