/// <summary> /// Cleans up the instance's resources. /// </summary> public static void cleanup() { if (s_instance != null) { s_instance.m_audio.Dispose(); s_instance.m_waveBank.Dispose(); s_instance.m_soundBank.Dispose(); } s_instance = null; }
/// <summary> /// Provides the instance of the class as per the Singleton pattern. /// </summary> /// <returns>The only instance of SoundEngine.</returns> public static SoundEngine getInstance() { if (s_instance == null) { s_instance = new SoundEngine(); } return s_instance; }