release: v1.2.0 (vc 10) 정식 출시 빌드 및 BGM 라이프사이클/포커스 제어 강화

This commit is contained in:
2026-11-01 17:10:06 +09:00
parent 173ba7c92c
commit 7a10452895
5 changed files with 30 additions and 5 deletions
+2 -2
View File
@@ -13,8 +13,8 @@ android {
applicationId = "com.wordpuzzle.hangul"
minSdk = 26
targetSdk = 36
versionCode = 7
versionName = "1.1.5"
versionCode = 10
versionName = "1.2.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
@@ -50,6 +50,15 @@ class MainActivity : ComponentActivity() {
}
}
override fun onWindowFocusChanged(hasFocus: Boolean) {
super.onWindowFocusChanged(hasFocus)
if (!hasFocus) {
SoundManager.pauseBgm()
} else {
SoundManager.resumeBgm()
}
}
override fun onPause() {
super.onPause()
SoundManager.pauseBgm()
@@ -45,7 +45,13 @@ fun GameScreen(
LaunchedEffect(stageNumber, isSelectionMode) {
viewModel.loadStage(stageNumber, isSelectionMode)
}
DisposableEffect(stageNumber) {
SoundManager.playPuzzleBgm(context, stageNumber)
onDispose {
SoundManager.stopBgm()
}
}
// 앱이 백그라운드로 내려가거나 온파즈/온스톱 시 타이머를 일시정지하고, 온리줌 시 재개
@@ -76,13 +76,19 @@ fun MainLobbyScreen(
}
}
DisposableEffect(Unit) {
SoundManager.playMainBgm(context)
onDispose {
SoundManager.stopBgm()
}
}
LaunchedEffect(Unit) {
val count = stageRepo.getTotalStageCount()
if (count > 0) {
totalStages = count
}
prefs.checkAndApplyDailyHintRecovery()
SoundManager.playLobbyBgm(context)
}
Scaffold(
@@ -75,12 +75,16 @@ object SoundManager {
}
/**
* 메인 로비 화면 전용 BGM 재생
* 메인 화면 전용 BGM 재생
*/
fun playLobbyBgm(context: Context) {
fun playMainBgm(context: Context) {
playBgmResource(context, R.raw.bgm_lobby)
}
fun playLobbyBgm(context: Context) {
playMainBgm(context)
}
/**
* 퍼즐 화면 전용 BGM 재생 (10개 스테이지 단위로 퍼즐 BGM이 바뀜)
*/