Exemple #1
0
    //TODO: REPLACE WITH ONTOUCH WITH RAYCAST
    public void OnMouseUp()
    {
        Background header = GameObject.Find("Headers").GetComponent <Background>();
        Background footer = GameObject.Find("Footer").GetComponent <Background>();

        //Debug.Log(EventSystem.current.currentSelectedGameObject.name);
        if (EventSystem.current.currentSelectedGameObject != null)
        //&& EventSystem.current.currentSelectedGameObject.CompareTag("arrow"))
        {
            //Debug.Log("in case of arrow");
            return;
        }
        else if (header.inBackground == true || footer.inBackground == true)
        {
            return;
        }
        else
        {
            //Debug.Log("not in arrow case");
            if (isAuthor)
            {
                //Debug.Log("Select Author");
                list.SelectAuthor(id, text);
            }
            else
            {
                list.SelectPoem(id, text);
            }
        }
    }