コード例 #1
0
        /// <summary>
        /// 创建加载资源代理辅助器更新事件。
        /// </summary>
        /// <param name="type">进度类型。</param>
        /// <param name="progress">进度。</param>
        /// <returns>创建的加载资源代理辅助器更新事件。</returns>
        public static LoadResourceAgentHelperUpdateEventArgs Create(LoadResourceProgress type, float progress)
        {
            LoadResourceAgentHelperUpdateEventArgs loadResourceAgentHelperUpdateEventArgs = ReferencePool.Acquire <LoadResourceAgentHelperUpdateEventArgs>();

            loadResourceAgentHelperUpdateEventArgs.Type     = type;
            loadResourceAgentHelperUpdateEventArgs.Progress = progress;
            return(loadResourceAgentHelperUpdateEventArgs);
        }
コード例 #2
0
 public override void OnLoadUpdate(LoadResourceAgent agent, LoadResourceProgress type, float progress)
 {
     base.OnLoadUpdate(agent, type, progress);
     if (type == LoadResourceProgress.LoadScene)
     {
         m_LoadSceneCallbacks.LoadSceneUpdateCallback?.Invoke(AssetName, progress, UserData);
     }
 }
 public override void OnLoadUpdate(LoadResourceAgent agent, LoadResourceProgress type, float progress)
 {
     base.OnLoadUpdate(agent, type, progress);
     if (type == LoadResourceProgress.LoadAsset)
     {
         if (m_InstantiateAssetCallbacks.InstantiateAssetUpdateCallback != null)
         {
             m_InstantiateAssetCallbacks.InstantiateAssetUpdateCallback(AssetName, progress, UserData);
         }
     }
 }
 public virtual void OnLoadAssetUpdate(LoadResourceAgent agent, LoadResourceProgress type, float progress)
 {
 }
コード例 #5
0
 public LoadResourceAgentHelperUpdateEventArgs(LoadResourceProgress type, float progress)
 {
     Type     = type;
     Progress = progress;
 }
コード例 #6
0
 //
 // 摘要:
 //     /// 初始化加载资源代理辅助器更新事件的新实例。 ///
 //
 // 参数:
 //   type:
 //     进度类型。
 //
 //   progress:
 //     进度。
 public LoadResourceUpdateEventArgs(LoadResourceProgress type, float progress)
 {
     Progress = progress;
     Type     = type;
 }