예제 #1
0
    private static void Init()
    {
        ILLog.Log("hahahah");

        LogicContext.Creat();
        try
        {
            throw new System.Exception("hhh");
        }
        catch (System.Exception ex)
        {
            ILLog.LogException(ex);
        }
    }
예제 #2
0
 /// <summary>
 /// 销毁Entity
 /// 最好创建一个组件,标记这个Entity为Destroy状态,在单独的CleanupSystem里面遍历销毁
 /// 防止在处理Entity的时候调用的接口将Entity删除造成逻辑错误
 /// </summary>
 public void Destroy()
 {
     if (IsDestroyed)
     {
         return;
     }
     if (Id == 1)
     {
         ILLog.LogError("UniqueEntity 不能调用 Destroy()");
         return;
     }
     if (owner != null)
     {
         owner.DestroyEntity(this);
     }
     owner       = null;
     IsDestroyed = true;
 }