/// <summary> /// Open the menu in the next frame to prevent input from the game to be accidentally sent to the menu. /// </summary> private IEnumerator <WaitCommand> OpenInternal(MenuId id, Action <MenuActionId, Action> menuCloseHandler) { _menuCloseHandler = (action, onComplete) => { menuCloseHandler(action, onComplete); _renderer.SetActive(false); }; yield return(WaitCommand.WaitForNextFrame); _renderer.SetActive(true); _model.MenuState = id; _model.OpenMenu(); _inputModule.ActivateModule(); }
public static int ActivateModule(IntPtr l) { int result; try { BaseInputModule baseInputModule = (BaseInputModule)LuaObject.checkSelf(l); baseInputModule.ActivateModule(); LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }