コード例 #1
0
 private void backButtonCloseAction() {
   if (GameAssets.GAME_STATE.equals(GameAssets.GAME_MENU)) {
     if (GameAssets.backgroundMusic != null) {
       GameAssets.backgroundMusic.play();
       GameAssets.backgroundMusic.setVolume(GameAssets.musicVolume);
     }
   } else if (GameAssets.GAME_STATE.equals(GameAssets.GAME_START)) {
     if (GameAssets.gameStageBackgroundMusic != null) {
       GameAssets.gameStageBackgroundMusic.play();
       GameAssets.gameStageBackgroundMusic.setVolume(GameAssets.musicVolume / 2);
     }
   }
 }
コード例 #2
0
 private void backButtonOpenAction() {
   if (!GameAssets.isGamePause
       && !GameAssets.GAME_STATE.equals(GameAssets.GAME_START)
       && !GameAssets.isGameOver) {
     GameAssets.isGamePauseAndroid = true;
   }
   GameAssets.pauseAllSound();
 }