예제 #1
0
    private void OnTriggerExit(Collider other)
    {
        IGrabable grabable = other.GetComponentInParent <IGrabable>();

        if (grabable != null)
        {
            grabable.SetHighlighted(false);
        }
    }
예제 #2
0
    private void OnTriggerEnter(Collider other)
    {
        IGrabable grabable = other.GetComponentInParent <IGrabable>();

        if (grabable != null)
        {
            grabable.SetHighlighted(true);
        }
        //else
        //{
        //    Debug.Log("not an IGrabable");
        //}
    }