Exemplo n.º 1
0
  /**
   * Stops some previous state music.
   *
   * @param state
   */
  private void stopPreviousState(int state) {
    switch (this.state) {
      case StateManager.STATE_MENU:
        if (state != StateManager.STATE_SELECTION) SoundEffect.MENU.stop();
        break;
      case StateManager.STATE_SELECTION:
        if (state != StateManager.STATE_MENU) SoundEffect.MENU.stop();
        break;
      case StateManager.STATE_GAME:
        SoundEffect.GAME1.stop();
        SoundEffect.GAME2.stop();
        break;
      case StateManager.STATE_WIN:
        SoundEffect.WIN.stop();
        break;

      default:
        break;
    }
  }