public void OnFocus(ApplicationFocusEvent e, UserAsTank userAsTank) { if (e.IsFocused && (userAsTank.mouseControlStateHolder.MouseControlAllowed && !this.IsErrorScreen())) { Cursor.visible = false; Cursor.lockState = CursorLockMode.Locked; } }
public void HideCursor(BattleFullyLoadedEvent e, UserAsTank selfBattleUserAsTank) { if (selfBattleUserAsTank.mouseControlStateHolder.MouseControlAllowed) { Cursor.visible = false; Cursor.lockState = CursorLockMode.Locked; } }
public void Update(UpdateEvent e, UserAsTank userAsTank) { if (userAsTank.mouseControlStateHolder.MouseControlAllowed) { if (InputManager.GetActionKeyDown(BattleActions.SHOW_SCORE)) { Cursor.lockState = CursorLockMode.Confined; Cursor.visible = true; } if (InputManager.GetActionKeyUp(BattleActions.SHOW_SCORE)) { Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; } } }
public void SetCursorWhenCloseChat(NodeRemoveEvent e, SingleNode <BattleChatStateComponent> battleChatState, UserAsTank userAsTank) { if (userAsTank.mouseControlStateHolder.MouseControlAllowed) { Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; } }
public void HideCursor(NodeAddedEvent e, SingleNode <BattleScreenComponent> battleLoadScreen, [JoinAll] UserAsTank selfBattleUserAsTank) { base.ScheduleEvent <BattleFullyLoadedEvent>(selfBattleUserAsTank); }