static void Main(string[] args) { Regulus.Script.Lua.VirtualMachineProvider vmp = new Regulus.Script.Lua.VirtualMachineProvider(); vmp.Initialize(_OpenPlugin("ScriptLuaDotNet.dll")); var vm = vmp.Create(); // 測試呼叫lua code vm.Execute("function Add(a,b) return a-b end"); object[] results = vm.Call("Add" , 1 , 2); vmp.Finialize(); }
static void Main(string[] args) { Regulus.Script.Lua.VirtualMachineProvider vmp = new Regulus.Script.Lua.VirtualMachineProvider(); vmp.Initialize(_OpenPlugin("ScriptLuaDotNet.dll")); var vm = vmp.Create(); // 測試呼叫lua code vm.Execute("function Add(a,b) return a-b end"); object[] results = vm.Call("Add", 1, 2); vmp.Finialize(); }