void Update()
    {
        if (Input.GetKeyDown(KeyCode.Tab))
        {
            ArenaManager.GetHostileTargets(PlayerUnit, 10);
        }

        CheckActionBarButtons();

        if (Input.GetMouseButtonDown(0))
        {
            if (!EventSystem.current.IsPointerOverGameObject())
            {
                if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hitInfo, 1 << LayerMask.NameToLayer("Characters")))
                {
                    CheckTargetSelection(hitInfo.transform.GetComponent <Unit>());
                }
            }
        }

        /*if (Input.GetMouseButtonDown(0))
         * {
         *  if (!EventSystem.current.IsPointerOverGameObject())
         *  {
         *      RaycastHit2D hit = Physics2D.Raycast(new Vector2(mainCamera.ScreenToWorldPoint(Input.mousePosition).x,
         *      mainCamera.ScreenToWorldPoint(Input.mousePosition).y), Vector2.zero, 0, 1 << LayerMask.NameToLayer("Characters"));
         *
         *      if (hit.transform != null)
         *          CheckTargetSelection(hit.transform.GetComponent<Unit>());
         *      else
         *          CheckTargetSelection(null);
         *  }
         * }*/

        playerCastFrameNewUI.UpdateUnit();
        playerFrameNewUI.UpdateFrame();
        if (targetFrameNewUI.gameObject.activeSelf)
        {
            targetFrameNewUI.UpdateFrame();
        }
    }