Exemplo n.º 1
0
    protected void CheckPlayerInput()
    {
        if (!InputManager.Get_KeyE)
        {
            return;
        }

        playerData.IsInConversation = true;
        CursorLockState.ToggleCursorLockState(CursorLockMode.None);
        ui.ToggleInteractionText("");
        npcShowDialogueText.showMessage(0);
    }
Exemplo n.º 2
0
 private void checkDialoguePanel()
 {
     for (int i = 0; i < canvasObjects.Count; i++)
     {
         if (canvasObjects[i].activeInHierarchy)
         {
             CursorLockState.ToggleCursorLockState(CursorLockMode.None);
             return;
         }
     }
     CursorLockState.ToggleCursorLockState(CursorLockMode.Locked);
     playerData.IsInConversation = false;
 }
Exemplo n.º 3
0
 private void Update()
 {
     checkDialoguePanel();
     if (CursorLockState.GetCursorLockState() == CursorLockMode.Locked)
     {
         cursorActive = false;
         return;
     }
     else
     {
         cursorActive = true;
         return;
     }
 }
Exemplo n.º 4
0
    private void Update()
    {
        movementInput = new Vector3(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"), 0);

        scrollWheel = Input.GetAxis("Mouse ScrollWheel");

        mouseX = Input.GetAxis("Mouse X");
        mouseY = Input.GetAxis("Mouse Y");

        key_shift = Input.GetKey(keycode_shift);
        key_e     = Input.GetKeyDown(keycode_e);

        if (Input.GetKeyDown(KeyCode.Space))
        {
            CursorLockState.ToggleCursorLockState();
        }
    }
Exemplo n.º 5
0
    private void Update()
    {
        if (!InputManager.Get_KeyEscape)
        {
            return;
        }

        if (playerData.IsInConversation)
        {
            return;
        }

        if (toggleUI.Get_PausePanel.activeInHierarchy)
        {
            toggleUI.TogglePauseWindow(false);
            isPaused = false;
            CursorLockState.ToggleCursorLockState(CursorLockMode.Locked);
            return;
        }
        toggleUI.TogglePauseWindow(true);
        isPaused = true;
        CursorLockState.ToggleCursorLockState(CursorLockMode.None);
        CursorViewState.SetCursorTexture(CursorViewState.Get_Normal);
    }
Exemplo n.º 6
0
 private void Start()
 {
     playerData = FindObjectOfType <PlayerData>();
     CursorLockState.ToggleCursorLockState(CursorLockMode.Locked);
 }
Exemplo n.º 7
0
 public static Vector2 GetMousePosition(CursorLockState cursorLockState)
 {
     CursorLockState = cursorLockState;
     return GetMousePosition();
 }