스테이지에 따른 BGM 추가

This commit is contained in:
Mingu Kim
2025-03-01 20:51:18 +09:00
parent ef558d0a48
commit d29101526e
3 changed files with 143 additions and 0 deletions

View File

@@ -6,6 +6,8 @@ namespace TON
{
public class SoundManager : MonoBehaviour
{
public AudioSource bgSound;
public static SoundManager instance;
private void Awake()
@@ -31,5 +33,13 @@ namespace TON
Destroy(go, clip.length);
}
public void BgSoundPlay(AudioClip clip)
{
bgSound.clip = clip;
bgSound.loop = true;
bgSound.volume = 1f;
bgSound.Play();
}
}
}