Example #1
0
    void OnTriggerExit2D(Collider2D collision)
    {
        area_.color = normal_color_;
        DragDropRecipientes drag = collision.GetComponent <DragDropRecipientes> ();

        if (drag != null)
        {
            if (drag.id_ == id_)
            {
                drag._saiuDropPoint();
            }
        }
    }
Example #2
0
    void OnTriggerEnter2D(Collider2D collision)
    {
        DragDropRecipientes drag = collision.GetComponent <DragDropRecipientes> ();

        if (drag != null)
        {
            if (drag.id_ == id_)
            {
                drag._entrouDropPoint(true, transform.position);
                area_.color = highlight_color_;
            }
            else
            {
                //drag._entrouDropPoint (false, transform.position);
                area_.color = error_color_;
            }
        }
    }