Ejemplo n.º 1
0
 /// <summary>
 /// 初始化加载场景更新事件的新实例。
 /// </summary>
 /// <param name="e">内部事件。</param>
 public LoadSceneUpdateEventArgs(GameFramework.Scene.LoadSceneUpdateEventArgs e)
 {
     SceneName      = e.SceneName;
     SceneAssetName = e.SceneAssetName;
     Progress       = e.Progress;
     UserData       = e.UserData;
 }
Ejemplo n.º 2
0
 private void OnLoadSceneUpdate(object sender, GameFramework.Scene.LoadSceneUpdateEventArgs e)
 {
     if (m_EnableLoadSceneUpdateEvent)
     {
         _eventComponent.Fire(this, ReferencePool.Acquire <LoadSceneUpdateEventArgs>().Fill(e));
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 填充加载场景更新事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>加载场景更新事件。</returns>
        public LoadSceneUpdateEventArgs Fill(GameFramework.Scene.LoadSceneUpdateEventArgs e)
        {
            SceneAssetName = e.SceneAssetName;
            Progress       = e.Progress;
            UserData       = e.UserData;

            return(this);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 创建加载场景更新事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的加载场景更新事件。</returns>
        public static LoadSceneUpdateEventArgs Create(GameFramework.Scene.LoadSceneUpdateEventArgs e)
        {
            LoadSceneUpdateEventArgs loadSceneUpdateEventArgs = ReferencePool.Acquire <LoadSceneUpdateEventArgs>();

            loadSceneUpdateEventArgs.SceneAssetName = e.SceneAssetName;
            loadSceneUpdateEventArgs.Progress       = e.Progress;
            loadSceneUpdateEventArgs.UserData       = e.UserData;
            return(loadSceneUpdateEventArgs);
        }