30 lines
743 B
C#
30 lines
743 B
C#
using System.Collections;
|
|
using DarkTonic.MasterAudio;
|
|
using DG.Tweening;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
using UnityEngine.UI;
|
|
|
|
public class WorldMap : MonoBehaviour
|
|
{
|
|
|
|
public void LoadNextScene()
|
|
{
|
|
MasterAudio.PlaySound("SFX_Click", 1f, null);
|
|
// 다음 씬으로 이동
|
|
StartCoroutine(LoadSceneAfterDelay(5, 0.1f));
|
|
}
|
|
public void LoadBeforeScene()
|
|
{
|
|
MasterAudio.PlaySound("SFX_UI_Back", 1f, null);
|
|
// 다음 씬으로 이동
|
|
StartCoroutine(LoadSceneAfterDelay(3, 0.1f));
|
|
}
|
|
|
|
private IEnumerator LoadSceneAfterDelay(int sceneIndex, float delay)
|
|
{
|
|
yield return new WaitForSeconds(delay);
|
|
SceneManager.LoadScene(sceneIndex);
|
|
}
|
|
|
|
} |