Пример #1
0
        override public bool BeginCapture(InputEvent e)
        {
            GameObjectRayHit hit;

            if (!FindGORayIntersection(e.ray, out hit))
            {
                return(false);       // this should not be possible...
            }
            if (custom_begin_capture(e, hit))
            {
                eInterMode = InteractionMode.InCustom;
            }
            else if (handleGO.IsSameOrChild(hit.hitGO))
            {
                onHandlePress(e, hit.hitPos);
                eInterMode    = InteractionMode.InHandleDrag;
                vStartHitW    = hit.hitPos;
                vHandleStartW = handleGO.GetWorldFrame();
            }
            else if (backgroundGO.IsSameOrChild(hit.hitGO))
            {
                onSliderbarPress(e, hit.hitPos);
                eInterMode    = InteractionMode.InPressDrag;
                vStartHitW    = hit.hitPos;
                vHandleStartW = handleGO.GetWorldFrame();
            }
            return(true);
        }
Пример #2
0
 protected void standard_begin_capture(InputEvent e, GameObjectRayHit hit)
 {
     if (handleGO.IsSameOrChild(hit.hitGO))
     {
         onHandlePress(e, hit.hitPos);
         eInterMode    = InteractionMode.InHandleDrag;
         vStartHitW    = hit.hitPos;
         vHandleStartW = handleGO.GetWorldFrame();
     }
     else if (backgroundGO.IsSameOrChild(hit.hitGO))
     {
         onSliderbarPress(e, hit.hitPos);
         eInterMode    = InteractionMode.InPressDrag;
         vStartHitW    = hit.hitPos;
         vHandleStartW = handleGO.GetWorldFrame();
     }
 }