コード例 #1
0
        /// <summary>
        /// 创建加载全局配置成功事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的加载全局配置成功事件。</returns>
        public static LoadConfigSuccessEventArgs Create(ReadDataSuccessEventArgs e)
        {
            LoadConfigSuccessEventArgs loadConfigSuccessEventArgs = ReferencePool.Acquire <LoadConfigSuccessEventArgs>();

            loadConfigSuccessEventArgs.ConfigAssetName = e.DataAssetName;
            loadConfigSuccessEventArgs.Duration        = e.Duration;
            loadConfigSuccessEventArgs.UserData        = e.UserData;
            return(loadConfigSuccessEventArgs);
        }
コード例 #2
0
        /// <summary>
        /// 创建加载全局配置成功事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的加载全局配置成功事件。</returns>
        public static LoadConfigSuccessEventArgs Create(GameFramework.Config.LoadConfigSuccessEventArgs e)
        {
            LoadConfigInfo             loadConfigInfo             = (LoadConfigInfo)e.UserData;
            LoadConfigSuccessEventArgs loadConfigSuccessEventArgs = ReferencePool.Acquire <LoadConfigSuccessEventArgs>();

            loadConfigSuccessEventArgs.ConfigName      = loadConfigInfo.ConfigName;
            loadConfigSuccessEventArgs.ConfigAssetName = e.ConfigAssetName;
            loadConfigSuccessEventArgs.Duration        = e.Duration;
            loadConfigSuccessEventArgs.UserData        = loadConfigInfo.UserData;
            ReferencePool.Release(loadConfigInfo);
            return(loadConfigSuccessEventArgs);
        }
コード例 #3
0
 private void OnLoadConfigSuccess(object sender, GameFramework.Config.LoadConfigSuccessEventArgs e)
 {
     m_EventComponent.Fire(this, LoadConfigSuccessEventArgs.Create(e));
 }
コード例 #4
0
 private void OnReadDataSuccess(object sender, ReadDataSuccessEventArgs e)
 {
     m_EventComponent.Fire(this, LoadConfigSuccessEventArgs.Create(e));
 }