Пример #1
0
    /// <summary>
    /// 停止并销毁声音
    /// </summary>
    /// <param name="clipName"></param>
    public void Stop(string clipName)
    {
        SoundData data = GetAudioSource(clipName);

        if (null != data)
        {
            data.Dispose();
        }
    }
Пример #2
0
        //--------------------//

        #region Dispose
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing)
                {
                    // This block will only be executed on manual disposal, not by Garbage Collection
                    Log.Info("Disposing " + this);
                    SoundData?.Dispose();
                }
            }
            finally
            {
                base.Dispose(disposing);
            }
        }
Пример #3
0
 public void Dispose()
 {
     Data?.Dispose();
 }