// Update is called once per frame
    void Update()
    {
        entityContainerScript.BroadcastPlayerPosition(player.transform.position);

        if (Input.GetMouseButtonDown(1))
        {
            UseItem();
        }

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (!menu.activeSelf)
            {
                OpenMenu(levelName + " (Paused)");
            }
            else if (menu.activeSelf && titleText.text.Contains("Paused"))
            {
                CloseMenu();
            }
        }
    }