PlayerCharacter.PollGUIKeys C# (CSharp) Method

PollGUIKeys() protected method

Called by the owning client from the InputPoller.Poll function within a subclass to respond to keystrokes.
protected PollGUIKeys ( ) : void
return void
    protected virtual void PollGUIKeys()
    {
        if (!myNetworkView.isMine)
        {
            Debug.LogError("Attempting to call PollGUIKeys when we're not the owner!");
        }
        else
        {
            // Menu invoke
            if (Input.GetKeyUp(KeyCode.Escape))
            {
                gameDirector.ShowGameMenu();
            }

            // Chat box invoke
            if (Input.GetKeyUp(KeyCode.Return) || Input.GetKeyUp(KeyCode.KeypadEnter))
            {
                gameDirector.ShowChatBar();
            }
        }
    }