UI 종료 시 사운드 재생을 위해 딜레이 추가

This commit is contained in:
Mingu Kim
2025-03-01 18:04:55 +09:00
parent 85b8c6cadc
commit e64f872734
2 changed files with 8 additions and 9 deletions

View File

@@ -193,6 +193,13 @@ namespace TON
public void OnClickCloseButton() public void OnClickCloseButton()
{ {
StartCoroutine(CloseButtonDelay());
}
IEnumerator CloseButtonDelay()
{
yield return new WaitForSeconds(0.2f); // 0.2초 대기
UIManager.Hide<SkillSettingUI>(UIList.SkillSettingUI); UIManager.Hide<SkillSettingUI>(UIList.SkillSettingUI);
} }
} }

View File

@@ -7,14 +7,6 @@ namespace TON
public class TitleUI : UIBase public class TitleUI : UIBase
{ {
public CharaterSelectUI charaterSelectUI; public CharaterSelectUI charaterSelectUI;
AudioSource _buttonAudio;
private void Start()
{
_buttonAudio = gameObject.AddComponent<AudioSource>();
DontDestroyOnLoad(this.transform.parent.gameObject);
}
public void OnClickStartButton() public void OnClickStartButton()
{ {
@@ -23,7 +15,7 @@ namespace TON
IEnumerator StartButtonDelay() IEnumerator StartButtonDelay()
{ {
yield return new WaitForSeconds(1f); // 1초 대기 yield return new WaitForSeconds(0.2f); // 0.2초 대기
// Main.Singleton?.ChangeScene(SceneType.Ingame); // Main.Singleton?.ChangeScene(SceneType.Ingame);
UIManager.Hide<TitleUI>(UIList.TitleUI); UIManager.Hide<TitleUI>(UIList.TitleUI);