From f0714052ddc55b3697097d2427bd2c8cb17f4985 Mon Sep 17 00:00:00 2001 From: 99jamin <99jamin56@gmail.com> Date: Mon, 31 Mar 2025 11:38:51 +0900 Subject: [PATCH] =?UTF-8?q?Do-83=20[Style]=20=EC=A3=BC=EC=84=9D=20?= =?UTF-8?q?=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Script/Common/AudioManager.cs | 17 ++++++++--------- Assets/Script/Common/CoinsPanelController.cs | 2 -- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Assets/Script/Common/AudioManager.cs b/Assets/Script/Common/AudioManager.cs index a4f9d0b..b281944 100644 --- a/Assets/Script/Common/AudioManager.cs +++ b/Assets/Script/Common/AudioManager.cs @@ -21,7 +21,7 @@ public class AudioManager : Singleton protected override void Awake() { - base.Awake(); // 부모 클래스의 Awake 호출 + base.Awake(); // BGM과 SFX를 위한 별도의 AudioSource 생성 bgmAudioSource = gameObject.AddComponent(); @@ -69,9 +69,9 @@ public class AudioManager : Singleton if (bgmAudioSource != null && mainBgm != null && !bgmAudioSource.isPlaying) { bgmAudioSource.clip = mainBgm; - bgmAudioSource.loop = true; // BGM을 반복 재생 - bgmAudioSource.volume = 0.1f; // BGM 볼륨 설정 - bgmAudioSource.Play(); // BGM 재생 + bgmAudioSource.loop = true; + bgmAudioSource.volume = 0.1f; + bgmAudioSource.Play(); } } @@ -82,9 +82,9 @@ public class AudioManager : Singleton if (bgmAudioSource != null && gameBgm != null && !bgmAudioSource.isPlaying) { bgmAudioSource.clip = gameBgm; - bgmAudioSource.loop = true; // BGM을 반복 재생 - bgmAudioSource.volume = 0.1f; // BGM 볼륨 설정 - bgmAudioSource.Play(); // 게임 BGM 재생 + bgmAudioSource.loop = true; + bgmAudioSource.volume = 0.1f; + bgmAudioSource.Play(); } } @@ -111,11 +111,10 @@ public class AudioManager : Singleton { if (bgmAudioSource != null && bgmAudioSource.isPlaying) { - bgmAudioSource.Stop(); // 게임용 BGM을 멈춤 + bgmAudioSource.Stop(); } } - // 씬이 로드될 때마다 호출되는 OnSceneLoaded 메서드 protected override void OnSceneLoaded(Scene scene, LoadSceneMode mode) { PlayBGM(); diff --git a/Assets/Script/Common/CoinsPanelController.cs b/Assets/Script/Common/CoinsPanelController.cs index 56d34d5..4d637bc 100644 --- a/Assets/Script/Common/CoinsPanelController.cs +++ b/Assets/Script/Common/CoinsPanelController.cs @@ -130,8 +130,6 @@ public class CoinsPanelController : MonoBehaviour /// public void RemoveCoins(Action action) { - // -------------------------------------------------------------------- - // TODO : 임시 게임 매니저 혹은 별도 관리자가 관리해야함. if (_coinsCount < 100) { EmptyCoins();