Esempio n. 1
0
 /// <summary>
 /// 初始化加载场景回调函数集的新实例。
 /// </summary>
 /// <param name="loadSceneSuccessCallback">加载场景成功回调函数。</param>
 /// <param name="loadSceneDependencyAssetCallback">加载场景时加载依赖资源回调函数。</param>
 public LoadSceneCallbacks(LoadSceneSuccessCallback loadSceneSuccessCallback, LoadSceneDependencyAssetCallback loadSceneDependencyAssetCallback)
     : this(loadSceneSuccessCallback, null, null, loadSceneDependencyAssetCallback)
 {
 }
        /// <summary>
        /// 初始化加载场景回调函数集的新实例。
        /// </summary>
        /// <param name="loadSceneSuccessCallback">加载场景成功回调函数。</param>
        /// <param name="loadSceneFailureCallback">加载场景失败回调函数。</param>
        /// <param name="loadSceneUpdateCallback">加载场景更新回调函数。</param>
        /// <param name="loadSceneDependencyAssetCallback">加载场景时加载依赖资源回调函数。</param>
        public LoadSceneCallbacks(LoadSceneSuccessCallback loadSceneSuccessCallback, LoadSceneFailureCallback loadSceneFailureCallback, LoadSceneUpdateCallback loadSceneUpdateCallback, LoadSceneDependencyAssetCallback loadSceneDependencyAssetCallback)
        {
            if (loadSceneSuccessCallback == null)
            {
                throw new GameFrameworkException("Load scene success callback is invalid.");
            }

            m_LoadSceneSuccessCallback         = loadSceneSuccessCallback;
            m_LoadSceneFailureCallback         = loadSceneFailureCallback;
            m_LoadSceneUpdateCallback          = loadSceneUpdateCallback;
            m_LoadSceneDependencyAssetCallback = loadSceneDependencyAssetCallback;
        }