static int TestDelegate(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2 && TypeChecker.CheckTypes <System.Action <float>, float>(L, 1)) { System.Action <float> arg0 = (System.Action <float>)ToLua.ToObject(L, 1); float arg1 = (float)LuaDLL.lua_tonumber(L, 2); TestExportScript.TestDelegate(arg0, arg1); return(0); } else if (count == 2 && TypeChecker.CheckTypes <TestExportScript.CustomDelegate, string>(L, 1)) { TestExportScript.CustomDelegate arg0 = (TestExportScript.CustomDelegate)ToLua.ToObject(L, 1); string arg1 = ToLua.ToString(L, 2); TestExportScript.TestDelegate(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: TestExportScript.TestDelegate")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetDictionary(IntPtr L) { try { ToLua.CheckArgsCount(L, 0); System.Collections.Generic.Dictionary <int, string> o = TestExportScript.GetDictionary(); ToLua.PushSealed(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int PrintGameobject(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject)); TestExportScript.PrintGameobject(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }