private static int CloseAllPopedPanels(IntPtr L) { int result; try { ToLua.CheckArgsCount(L, 1); PanelManager panelManager = (PanelManager)ToLua.CheckObject(L, 1, typeof(PanelManager)); panelManager.CloseAllPopedPanels(); result = 0; } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }