예제 #1
0
 public void OnFocus(ApplicationFocusEvent e, UserAsTank userAsTank)
 {
     if (e.IsFocused && (userAsTank.mouseControlStateHolder.MouseControlAllowed && !this.IsErrorScreen()))
     {
         Cursor.visible   = false;
         Cursor.lockState = CursorLockMode.Locked;
     }
 }
예제 #2
0
 public void HideCursor(BattleFullyLoadedEvent e, UserAsTank selfBattleUserAsTank)
 {
     if (selfBattleUserAsTank.mouseControlStateHolder.MouseControlAllowed)
     {
         Cursor.visible   = false;
         Cursor.lockState = CursorLockMode.Locked;
     }
 }
예제 #3
0
 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;
         }
     }
 }
예제 #4
0
 public void SetCursorWhenCloseChat(NodeRemoveEvent e, SingleNode <BattleChatStateComponent> battleChatState, UserAsTank userAsTank)
 {
     if (userAsTank.mouseControlStateHolder.MouseControlAllowed)
     {
         Cursor.lockState = CursorLockMode.Locked;
         Cursor.visible   = false;
     }
 }
예제 #5
0
 public void HideCursor(NodeAddedEvent e, SingleNode <BattleScreenComponent> battleLoadScreen, [JoinAll] UserAsTank selfBattleUserAsTank)
 {
     base.ScheduleEvent <BattleFullyLoadedEvent>(selfBattleUserAsTank);
 }