Skip to content

Commit

Permalink
enable sounds and music on native platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
AlmasB committed Nov 26, 2020
1 parent d5c6111 commit da6c237
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,16 @@ protected void initSettings(GameSettings settings) {
settings.setHeight(HEIGHT);
settings.setFontUI("main_font.ttf");
settings.setIntroEnabled(true);
settings.setProfilingEnabled(true);
settings.setApplicationMode(ApplicationMode.DEVELOPER);
}

@Override
protected void onPreInit() {
getSettings().setGlobalMusicVolume(0);
getSettings().setGlobalSoundVolume(0);
getSettings().setGlobalMusicVolume(0.5);
getSettings().setGlobalSoundVolume(0.5);

if (!getSettings().isExperimentalNative()) {
loopBGM("BGM.mp3");
}
loopBGM("BGM.mp3");
}

@Override
Expand Down Expand Up @@ -201,9 +200,7 @@ private void animateCamera(Runnable onAnimationFinished) {
}

private void playHitSound() {
if (!getSettings().isExperimentalNative()) {
play("hit.wav");
}
play("hit.wav");
}

@Override
Expand Down

0 comments on commit da6c237

Please sign in to comment.