public static void SwitchView <TargetController>(this ViewControllerBase controller, Action onFinish = null) where TargetController : ViewControllerBase { controller.Hide(() => controller.viewManager.GetController <TargetController>().Show(onFinish) ); }
static int Hide(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { Nova.ViewControllerBase obj = (Nova.ViewControllerBase)ToLua.CheckObject <Nova.ViewControllerBase>(L, 1); obj.Hide(); return(0); } else if (count == 2) { Nova.ViewControllerBase obj = (Nova.ViewControllerBase)ToLua.CheckObject <Nova.ViewControllerBase>(L, 1); System.Action arg0 = (System.Action)ToLua.CheckDelegate <System.Action>(L, 2); obj.Hide(arg0); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: Nova.ViewControllerBase.Hide")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_myPanel(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Nova.ViewControllerBase obj = (Nova.ViewControllerBase)o; UnityEngine.GameObject ret = obj.myPanel; ToLua.PushSealed(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index myPanel on a nil value")); } }
static int set_myPanel(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Nova.ViewControllerBase obj = (Nova.ViewControllerBase)o; UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject)); obj.myPanel = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index myPanel on a nil value")); } }
static int get_viewManager(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Nova.ViewControllerBase obj = (Nova.ViewControllerBase)o; Nova.ViewManager ret = obj.viewManager; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index viewManager on a nil value")); } }
public void UnsetController(ViewControllerBase controller) { controllers.Remove(controller.GetType()); }
public void SetController(ViewControllerBase controller) { controllers[controller.GetType()] = controller; }