Exemplo n.º 1
0
 private void OnPlaySoundDependencyAsset(object sender, GameFramework.Sound.PlaySoundDependencyAssetEventArgs e)
 {
     if (m_EnablePlaySoundDependencyAssetEvent)
     {
         m_EventComponent.Fire(this, ReferencePool.Acquire <PlaySoundDependencyAssetEventArgs>().Fill(e));
     }
 }
        /// <summary>
        /// 填充播放声音时加载依赖资源事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>播放声音时加载依赖资源事件。</returns>
        public PlaySoundDependencyAssetEventArgs Fill(GameFramework.Sound.PlaySoundDependencyAssetEventArgs e)
        {
            PlaySoundInfo playSoundInfo = (PlaySoundInfo)e.UserData;

            SerialId            = e.SerialId;
            SoundAssetName      = e.SoundAssetName;
            SoundGroupName      = e.SoundGroupName;
            PlaySoundParams     = e.PlaySoundParams;
            DependencyAssetName = e.DependencyAssetName;
            LoadedCount         = e.LoadedCount;
            TotalCount          = e.TotalCount;
            BindingEntity       = playSoundInfo.BindingEntity;
            UserData            = playSoundInfo.UserData;

            return(this);
        }