/// <summary> /// 创建播放声音时加载依赖资源事件。 /// </summary> /// <param name="e">内部事件。</param> /// <returns>创建的播放声音时加载依赖资源事件。</returns> public static PlaySoundDependencyAssetEventArgs Create(GameFramework.Sound.PlaySoundDependencyAssetEventArgs e) { PlaySoundInfo playSoundInfo = (PlaySoundInfo)e.UserData; PlaySoundDependencyAssetEventArgs playSoundDependencyAssetEventArgs = ReferencePool.Acquire <PlaySoundDependencyAssetEventArgs>(); playSoundDependencyAssetEventArgs.SerialId = e.SerialId; playSoundDependencyAssetEventArgs.SoundAssetName = e.SoundAssetName; playSoundDependencyAssetEventArgs.SoundGroupName = e.SoundGroupName; playSoundDependencyAssetEventArgs.PlaySoundParams = e.PlaySoundParams; playSoundDependencyAssetEventArgs.DependencyAssetName = e.DependencyAssetName; playSoundDependencyAssetEventArgs.LoadedCount = e.LoadedCount; playSoundDependencyAssetEventArgs.TotalCount = e.TotalCount; playSoundDependencyAssetEventArgs.BindingEntity = playSoundInfo.BindingEntity; playSoundDependencyAssetEventArgs.UserData = playSoundInfo.UserData; return(playSoundDependencyAssetEventArgs); }
private void OnPlaySoundDependencyAsset(object sender, GameFramework.Sound.PlaySoundDependencyAssetEventArgs e) { m_EventComponent.Fire(this, PlaySoundDependencyAssetEventArgs.Create(e)); }