2026-04-27 중간저장
This commit is contained in:
21
Assets/02_Scripts/UI/BGMHud.cs
Normal file
21
Assets/02_Scripts/UI/BGMHud.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class BGMHud : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject _contentRoot;
|
||||
[SerializeField] private GameObject _contentPrefab;
|
||||
|
||||
private BGMBox currentBgm;
|
||||
|
||||
public void PlayPickBGM(GameObject buttonObj)
|
||||
{
|
||||
if(currentBgm != null)
|
||||
currentBgm.StopBGM();
|
||||
|
||||
BGMBox bgmBox = buttonObj.GetComponentInParent<BGMBox>();
|
||||
bgmBox.PlayBGM();
|
||||
|
||||
currentBgm = bgmBox;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user