Beispiel #1
0
    public override void Process()
    {
        for (int i = 0; i < pointers.Count; i++)
        {
            Pvr_UIPointer pointer = pointers[i];
            if (pointer == null)
            {
                return;
            }
            if (pointer.gameObject.activeInHierarchy && pointer.enabled)
            {
                PreformRaycaster(pointer);
                List <RaycastResult> results = new List <RaycastResult>();
                if (pointer.PointerActive())
                {
                    results = CheckRaycasts(pointer);
                }

                //Process events
                Hover(pointer, results);
                Click(pointer, results);
                Drag(pointer, results);
            }
        }
    }
    public override void Process()
    {
        if ((int)(confirmBtn & ConfirmBtn.App) == 1)
        {
            Pvr_UIPointer.AppBtnValue = Pvr_UnitySDKAPI.Controller.UPvr_GetKey(Pvr_UnitySDKAPI.Controller.UPvr_GetMainHandNess(), Pvr_UnitySDKAPI.Pvr_KeyCode.APP);
        }
        if ((int)(confirmBtn & ConfirmBtn.TouchPad) == 2)
        {
            Pvr_UIPointer.TouchBtnValue = Pvr_UnitySDKAPI.Controller.UPvr_GetKey(Pvr_UnitySDKAPI.Controller.UPvr_GetMainHandNess(), Pvr_UnitySDKAPI.Pvr_KeyCode.TOUCHPAD);
        }
        if ((int)(confirmBtn & ConfirmBtn.Trigger) == 4)
        {
            Pvr_UIPointer.TriggerBtnValue = Pvr_UnitySDKAPI.Controller.UPvr_GetKey(Pvr_UnitySDKAPI.Controller.UPvr_GetMainHandNess(), Pvr_UnitySDKAPI.Pvr_KeyCode.TRIGGER);
        }

        for (int i = 0; i < pointers.Count; i++)
        {
            Pvr_UIPointer pointer = pointers[i];
            if (pointer.gameObject.activeInHierarchy && pointer.enabled)
            {
                List <RaycastResult> results = new List <RaycastResult>();
                if (pointer.PointerActive())
                {
                    results = CheckRaycasts(pointer);
                }

                //Process events
                Hover(pointer, results);
                Click(pointer, results);
                Drag(pointer, results);
            }
        }
    }