예제 #1
0
        public TextScript FindTextScriptNoneInit(string name)
        {
            manager.SetGameVar("当前脚本名", name);
            manager.SetGameVar("MODE", "Avg模式");

            string classStr = SCRIPT_PATH + "." + name;
            Type   t        = Type.GetType(classStr);

            object[]   args   = new object[] { manager, root, ps };
            TextScript script = (TextScript)Activator.CreateInstance(t, args);

            return(script);
        }
예제 #2
0
 private TextScript FindScript(string name)
 {
     try
     {
         string     classStr = SCRIPT_PATH + "." + name;
         Type       t        = Type.GetType(classStr);
         object[]   args     = new object[] { dm, root, ps };
         TextScript script   = (TextScript)Activator.CreateInstance(t, args);
         return(script);
     }
     catch
     {
         Debug.LogError("未找到对应入口文件!");
         return(null);
     }
     //string classStr = SCRIPT_PATH + "." + name;
     //Type t = Type.GetType(classStr);
     //object[] args = new object[] { dm, root, ps };
     //TextScript script = (TextScript)Activator.CreateInstance(t, args);
     //return script;
 }