LuaFramework.LuaManager.DoFile C# (CSharp) Method

DoFile() public method

public DoFile ( string filename ) : object[]
filename string
return object[]
        public object[] DoFile(string filename) {
            return lua.DoFile(filename);
        }

Usage Example

Exemplo n.º 1
0
        public void RegisterHandlers()
        {
            string handlePath = "";

            if (AppConst.LuaBundleMode)
            {
                handlePath = Util.DataPath + "lua/protocol/handlers.txt";
            }
            else
            {
                handlePath = AppConst.FrameworkRoot + "/Lua/protocol/handlers.txt";
            }
            string text = File.ReadAllText(handlePath);

            string[] handlers = text.Split(';');
            for (int i = 0; i < handlers.Length; ++i)
            {
                if (string.IsNullOrEmpty(handlers[i]))
                {
                    continue;
                }
                string fileName = string.Format("protocol/handler/{0}", handlers[i]);
                LuaManager.DoFile(fileName);
            }
        }
All Usage Examples Of LuaFramework.LuaManager::DoFile