스테이지에 따른 BGM 추가
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user