public static void Start() { DirectoryInfo di = new DirectoryInfo(LuaConst.luaDir); files = di.GetFiles("*.lua", SearchOption.AllDirectories); foreach (var lFile in files) { LuaManager.LoadFile(lFile.FullName); } double MoveMax = (double)LuaManager.Lua["MovePatternMax"]; for (int lIndex = 0; lIndex < (int)MoveMax; lIndex++) { string methodName = "MovePattern" + lIndex; MovePattern.Add(LuaManager.GetFunction(methodName)); } double ShotMax = (double)LuaManager.Lua["ShotPatternMax"]; for (int lIndex = 0; lIndex < (int)ShotMax; lIndex++) { string methodName = "ShotPattern" + lIndex; ShotPattern.Add(LuaManager.GetFunction(methodName)); } }