示例#1
0
 private void UpdateMe()
 {
     if (Input.GetMouseButtonDown(0))
     {
         if (hasClicked == false)
         {
             DoubleClickTimer();
             return;
         }
         FindObjectToOrbitUnderMouse();
     }
     if (KeyboardInputManager.IsMovementPressed())
     {
         CmdStopOrbiting();
     }
 }
 private void Update()
 {
     if (PlayerManager.LocalPlayerScript.IsGhost || UIManager.IsInputFocus)
     {
         return;
     }
     if (monitor)
     {
         if (KeyboardInputManager.IsMovementPressed())
         {
             if (!closetControl.IsLocked)
             {
                 //TODO: This should probably be done in the main inputcontroller rather than in Update
                 closetControl.Interact(HandApply.ByLocalPlayer(closetControl.gameObject));
             }
         }
     }
 }
示例#3
0
    private void Update()
    {
        if (isLocalPlayer && playerMove != null)
        {
            //				 If being pulled by another player and you try to break free
            if (pushPull.IsBeingPulledClient && !playerScript.canNotInteract() &&
                KeyboardInputManager.IsMovementPressed())
            {
                pushPull.CmdStopFollowing();
                return;
            }
            if (ClientPositionReady && !playerMove.isGhost ||
                GhostPositionReady && playerMove.isGhost)
            {
                DoAction();
            }
        }

        Synchronize();
    }
示例#4
0
    private void Update()
    {
        // TODO add events to inventory slot changes to trigger channel refresh
        if (chatInputWindow.activeInHierarchy && !isChannelListUpToDate())
        {
            Logger.Log("Channel list is outdated!", Category.Chat);
            RefreshChannelPanel();
        }

        if (KeyboardInputManager.IsEnterPressed() && !windowCoolDown && chatInputWindow.activeInHierarchy)
        {
            if (UIManager.IsInputFocus)
            {
                parsedInput = Chat.ParsePlayerInput(InputFieldChat.text, chatContext);
                if (Chat.IsValidToSend(parsedInput.ClearMessage))
                {
                    PlayerSendChat(parsedInput.ClearMessage);
                }

                CloseChatWindow();
            }
        }

        if (!chatInputWindow.activeInHierarchy)
        {
            return;
        }
        if (KeyboardInputManager.IsEscapePressed())
        {
            CloseChatWindow();
        }

        if (InputFieldChat.isFocused)
        {
            return;
        }
        if (KeyboardInputManager.IsMovementPressed() || KeyboardInputManager.IsEscapePressed())
        {
            CloseChatWindow();
        }
    }
示例#5
0
    public void Update()
    {
        if (channelPanel.gameObject.activeInHierarchy && !isChannelListUpToDate())
        {
            RefreshChannelPanel();
        }

        if (UIManager.IsInputFocus)
        {
            if (!string.IsNullOrEmpty(InputFieldChat.text.Trim()) &&
                KeyboardInputManager.IsEnterPressed())
            {
                PlayerSendChat();
                CloseChatWindow();
            }
        }

        if (chatInputWindow.activeInHierarchy)
        {
            if (KeyboardInputManager.IsEscapePressed())
            {
                CloseChatWindow();
            }

            if (!InputFieldChat.isFocused)
            {
                if (KeyboardInputManager.IsMovementPressed() || KeyboardInputManager.IsEscapePressed())
                {
                    CloseChatWindow();
                }

                if (!string.IsNullOrEmpty(InputFieldChat.text.Trim()) &&
                    KeyboardInputManager.IsEnterPressed())
                {
                    PlayerSendChat();
                    CloseChatWindow();
                }
            }
        }
    }
示例#6
0
    private void Update()
    {
        // TODO add events to inventory slot changes to trigger channel refresh
        if (chatInputWindow.activeInHierarchy && !isChannelListUpToDate())
        {
            Logger.Log("Channel list is outdated!", Category.UI);
            RefreshChannelPanel();
        }

        if (KeyboardInputManager.IsEnterPressed() && !windowCoolDown)
        {
            if (UIManager.IsInputFocus)
            {
                if (!string.IsNullOrEmpty(InputFieldChat.text.Trim()))
                {
                    PlayerSendChat();
                }

                CloseChatWindow();
            }
        }

        if (!chatInputWindow.activeInHierarchy)
        {
            return;
        }
        if (KeyboardInputManager.IsEscapePressed())
        {
            CloseChatWindow();
        }

        if (InputFieldChat.isFocused)
        {
            return;
        }
        if (KeyboardInputManager.IsMovementPressed() || KeyboardInputManager.IsEscapePressed())
        {
            CloseChatWindow();
        }
    }
 private void Update()
 {
     if (PlayerManager.LocalPlayerScript.IsGhost || UIManager.IsInputFocus)
     {
         return;
     }
     if (monitor)
     {
         if (KeyboardInputManager.IsMovementPressed())
         {
             if (!closetControl.IsLocked)
             {
                 //TODO: This should probably be done in the main inputcontroller rather than in Update
                 closetControl.Interact(gameObject, "lefthand");
             }
         }
         //take the player with the closet so they can interact with it
         if (closetControl.transform.position != transform.position)
         {
             transform.position = closetControl.transform.position;
         }
     }
 }