C#单例


#region Signleton
protected static AD_WwiseManager _instance = new AD_WwiseManager();
 
private bool m_bInitialized = false;
 
public static AD_WwiseManager Instance
{
    get
    {
        _instance.Init();
        return _instance;
    }
}
 
private void Init()
{
    if (m_bInitialized) return;
 
    m_bInitialized = true;
}
#endregion