static int LoadChooseFight(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); System.Action arg0 = null; LuaTypes funcType1 = LuaDLL.lua_type(L, 1); if (funcType1 != LuaTypes.LUA_TFUNCTION) { arg0 = (System.Action)ToLua.CheckObject(L, 1, typeof(System.Action)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 1); arg0 = DelegateFactory.CreateDelegate(typeof(System.Action), func) as System.Action; } int o = SceneChanger.LoadChooseFight(arg0); LuaDLL.lua_pushinteger(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }