Пример #1
0
        public static void DoLogs(Object context)
        {
            // Examples of DLog.Log()
            DLog.Log("Log a message");
            DLog.Log("Log a message with a specific color", Color.blue);
            DLog.Log("Log a message with a user-defined color", new Color(0f, 0.5f, 0f));

            // Examples of DLog.LogWarning()
            DLog.LogWarning("Log a warning message");
            DLog.LogWarning("Log a warning message with a specific color", Color.yellow);
            DLog.LogWarning("Log a warning message with a user-defined color", new Color(1f, 0.5f, 0.25f));

            // Examples of DLog.LogError()
            DLog.LogError("Log an error message");
            DLog.LogError("Log an error message with a specific color", Color.red);
            DLog.LogError("Log an error message with a user-defined color", new Color(1f, 0f, 1f));

            // Examples of DLog.LogException()
            DLog.LogException(new System.Exception("Log an exception message"));
            DLog.LogException(new System.Exception("Log an exception message with a specific color"), Color.red);
            DLog.LogException(new System.Exception("Log an exception message with a user-defined color"), new Color(1f, 0f, 1f));

            // Examples of logging With Context
            DLog.Log("Log a message with a context", context);
            DLog.Log("Log a message with a specific color and context", Color.green, context);

            DLog.LogWarning("Log a warning message with a context", context);
            DLog.LogWarning("Log a warning message with a specific color and context", Color.cyan, context);

            DLog.LogError("Log an error message with a context", context);
            DLog.LogError("Log an error message with a specific color and context", Color.red, context);

            DLog.LogException(new System.Exception("Log an exception message with a context"), context);
            DLog.LogException(new System.Exception("Log an exception message with a specific color and context"), Color.red, context);
        }
Пример #2
0
        private void DestroyGame(string _key)
        {
            if (!mGameMap.ContainsKey(_key))
            {
                return;
            }

            DLog.LogWarning("准备释放一个GameCore,同时摧毁App相关所有UnityInterface. AppName = " + _key);
            mGameMap[_key].Dispose();
            mGameMap.Remove(_key);
            DLog.LogWarning("释放GameCore结束. AppName = " + _key);
        }
Пример #3
0
        public void PlayVfx(Vector3 pos)
        {
            if (impactVfxPrefab == null)
            {
                                #if UNITY_EDITOR
                DLog.LogWarning(string.Format(
                                    "Destroy Vfx of projectile of skill {0} is not configured", skill.GetType().Name
                                    ));
                                #endif
                return;
            }
            try {
//				effectPool.Obtain(impactVfxPrefab).transform.position = pos;
            }
            catch (Exception e) {
                DLog.LogError(e.Message + "\n" + e.StackTrace);
            }
        }
Пример #4
0
        override protected void DisposeNoGcCode()
        {
            DLog.LogWarning("准备释放AppCore.");
            System.Collections.Generic.List <string> tlist = new System.Collections.Generic.List <string>(mGameMap.Keys);
            foreach (string tkey in tlist)
            {
                DestroyGame(tkey);
            }

            System.Collections.Generic.List <string> tpublicmonos = new System.Collections.Generic.List <string>(mPublicMonoMap.Keys);
            foreach (string tkey in tlist)
            {
                MonoManagerBase tmono = mPublicMonoMap[tkey];
                mPublicMonoMap.Remove(tkey);
                tmono.DestroyManager();
            }
            base.DisposeNoGcCode();
        }
Пример #5
0
        protected override BehaviourNodeStatus OnExecute(AIAgent agent)
        {
#if UNITY_EDITOR
            switch (m_level)
            {
            case LogLevel.Info:
                DLog.Log(m_message);
                break;

            case LogLevel.Warning:
                DLog.LogWarning(m_message);
                break;

            case LogLevel.Error:
                DLog.LogError(m_message);
                break;
            }
#endif
            return(BehaviourNodeStatus.Success);
        }
Пример #6
0
 public CodeTool_SYS(string _appname) : base(_appname)
 {
     DLog.LogWarning("反射模式对多结构的支持目前有问题.暂时不能使用.单app结构,不需要卸载gamecore的不存在问题.");
 }