Ejemplo n.º 1
0
    public void DoPointerEnter(GameObject go)
    {
        VRDControllerInputHandler handler = go.GetComponent <VRDControllerInputHandler>() ?? go.GetComponentInParent <VRDControllerInputHandler>();

        if (handler != null)
        {
            handler.Subscribe(this);
        }

        UI_Button.OnPointerEnter(null);
    }
Ejemplo n.º 2
0
    public void DoPointerExit(GameObject go)
    {
        VRDControllerInputHandler handler = go.GetComponent <VRDControllerInputHandler>() ?? go.GetComponentInParent <VRDControllerInputHandler>();

        if (handler == null)
        {
            return;
        }

        handler.Unsubscribe(this);
        UI_Button.OnPointerExit(null);
    }
    public virtual void OnTriggerEnter(Collider other)
    {
        // Attempt to find an input handler
        // on the colliding object
        VRDControllerInputHandler controller =
            other.GetComponent <VRDControllerInputHandler>();

        // If an input handler is found
        // subscribe to it so input can
        // be reacted to
        if (controller != null)
        {
            handler = controller;
            handler.Subscribe(this);
        }
    }
    public virtual void OnTriggerExit(Collider other)
    {
        // Attempt to find an input handler on
        // the exiting object
        VRDControllerInputHandler controller =
            other.GetComponent <VRDControllerInputHandler>();

        // If a handler was found,
        // unsubscribe from to stop
        // receiving input
        if (controller != null)
        {
            controller.Unsubscribe(this);
            if (controller == handler)
            {
                handler = null;
            }
        }
    }