Esempio n. 1
0
    public void CallTablet(bool b)
    {
        tabletUp = b;
        invControl.setTabletState(b);

        if (player.GetComponent <MouseLook> ().enabled&& tabletUp)
        {
            changePlayerState();
        }
        if (!player.GetComponent <MouseLook> ().enabled&& !inventoryUp && !tabletUp)
        {
            changePlayerState();
        }

        if (map.activeSelf)
        {
            map.SetActive(false);
            mapUp = false;
        }

        if (tabletUp)
        {
            Cursor.visible               = true;
            Screen.lockCursor            = false;
            locomotionCanvas.enabled     = false;
            dicaLocomotionCanvas.enabled = true;
        }
        else if (!inventoryUp && !map.activeSelf)
        {
            Cursor.visible               = false;
            Screen.lockCursor            = true;
            locomotionCanvas.enabled     = true;
            dicaLocomotionCanvas.enabled = false;
        }
    }