public static void InitLogic(string logicName)
    {
        if (s_GlobalStatus.ContainsKey(logicName))
        {
            throw new Exception(logicName + " is Inited!");
        }
        else
        {
            IApplicationGlobalLogic l_statusTmp = (IApplicationGlobalLogic)Activator.CreateInstance(Type.GetType(logicName));
            s_GlobalStatus.Add(logicName, l_statusTmp);

            l_statusTmp.Init();
        }
    }
Exemple #2
0
    public static void InitLogic(string logicName)
    {
        if (s_GlobalStatus.ContainsKey(logicName))
        {
            throw new Exception(logicName + " is Inited!");
        }
        else
        {
            IApplicationGlobalLogic l_statusTmp = (IApplicationGlobalLogic)Activator.CreateInstance(Type.GetType(logicName));
            s_GlobalStatus.Add(logicName, l_statusTmp);

            s_logicList = new List <IApplicationGlobalLogic>(s_GlobalStatus.Values);

            try
            {
                l_statusTmp.Init();
            }
            catch (Exception e)
            {
                Debug.LogError(e.ToString());
            }
        }
    }