Beispiel #1
0
    public static void TreadInit(object param)
    {
        Action   kCallBack = (Action)param;
        LoadData kLoadData = null;

        for (int iIdx = 0; iIdx < m_kLoadData.Count; iIdx++)
        {
            kLoadData = m_kLoadData[iIdx];
            MethodInfo kMethodInfo = kLoadData.kType.GetMethod("Load", BindingFlags.Instance | BindingFlags.Public);
            try
            {
                kMethodInfo.Invoke(kLoadData.kObj, new object[] { kLoadData.text });
            }
            catch (System.Exception ex)
            {
                LogCenter.LogError("json Load Err: [" + kLoadData.kType.ToString() + "]----->" + ex.Message);
            }
        }
        m_kLoadData.Clear();
        if (kCallBack != null)
        {
            kCallBack();
        }

        // SceneTableConfig sTConfig = (SceneTableConfig)typeof(TableData).GetProperty("Scene2TableInfo").GetValue(null, null);
        //int st = sTConfig.m_kMapDatas[1][1];
    }
Beispiel #2
0
    public void LogHandler(string message, string stacktrace, UnityEngine.LogType type)
    {
        StringBuilder s = new StringBuilder();

        s.Append(message);
        s.Append("\r\n");
        if (type == UnityEngine.LogType.Error || type == UnityEngine.LogType.Exception)
        {
            s.Append(stacktrace);
            LogCenter.LogError(s.ToString());
        }
        else if (type == UnityEngine.LogType.Log)
        {
            LogCenter.Log(s.ToString());
        }
        else if (type == UnityEngine.LogType.Warning)
        {
            LogCenter.LogWarning(s.ToString());
        }
    }