/// <summary>
        /// 创建显示实体失败事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的显示实体失败事件。</returns>
        public static ShowEntityFailureEventArgs Create(GameFramework.Entity.ShowEntityFailureEventArgs e)
        {
            ShowEntityInfo             showEntityInfo             = (ShowEntityInfo)e.UserData;
            ShowEntityFailureEventArgs showEntityFailureEventArgs = ReferencePool.Acquire <ShowEntityFailureEventArgs>();

            showEntityFailureEventArgs.EntityId        = e.EntityId;
            showEntityFailureEventArgs.EntityLogicType = showEntityInfo.EntityLogicType;
            showEntityFailureEventArgs.EntityAssetName = e.EntityAssetName;
            showEntityFailureEventArgs.EntityGroupName = e.EntityGroupName;
            showEntityFailureEventArgs.ErrorMessage    = e.ErrorMessage;
            showEntityFailureEventArgs.UserData        = showEntityInfo.UserData;
            ReferencePool.Release(showEntityInfo);
            return(showEntityFailureEventArgs);
        }
Пример #2
0
 private void OnShowEntityFailure(object sender, GameFramework.Entity.ShowEntityFailureEventArgs e)
 {
     Log.Warning("Show entity failure, entity id '{0}', asset name '{1}', entity group name '{2}', error message '{3}'.", e.EntityId.ToString(), e.EntityAssetName, e.EntityGroupName, e.ErrorMessage);
     m_EventComponent.Fire(this, ShowEntityFailureEventArgs.Create(e));
 }