/// <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); }
/// <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); }
private void OnLoadConfigSuccess(object sender, GameFramework.Config.LoadConfigSuccessEventArgs e) { m_EventComponent.Fire(this, LoadConfigSuccessEventArgs.Create(e)); }
private void OnReadDataSuccess(object sender, ReadDataSuccessEventArgs e) { m_EventComponent.Fire(this, LoadConfigSuccessEventArgs.Create(e)); }