48 lines
1006 B
C#
48 lines
1006 B
C#
|
|
using DarkTonic.MasterAudio;
|
|||
|
|
using System;
|
|||
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
public class BgmConfig : MonoBehaviour
|
|||
|
|
{
|
|||
|
|
public string playlistName = "Bgm"; // <20>÷<EFBFBD><C3B7><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
|||
|
|
|
|||
|
|
private static BgmConfig instance;
|
|||
|
|
|
|||
|
|
public static BgmConfig Instance
|
|||
|
|
{
|
|||
|
|
get
|
|||
|
|
{
|
|||
|
|
if (instance == null)
|
|||
|
|
{
|
|||
|
|
instance = FindObjectOfType<BgmConfig>();
|
|||
|
|
|
|||
|
|
if (instance == null)
|
|||
|
|
{
|
|||
|
|
GameObject obj = new GameObject("BgmConfig");
|
|||
|
|
instance = obj.AddComponent<BgmConfig>();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
return instance;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void Start()
|
|||
|
|
{
|
|||
|
|
// BGM<47><4D> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
|||
|
|
MasterAudio.StartPlaylist(playlistName);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void Awake()
|
|||
|
|
{
|
|||
|
|
if (instance != null && instance != this)
|
|||
|
|
{
|
|||
|
|
Destroy(this.gameObject);
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
instance = this;
|
|||
|
|
DontDestroyOnLoad(gameObject);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|