コード例 #1
0
 /*--------------------------------------------------------------------------------------------*/
 public override Vector3 GetNearestWorldPosition(Ray pFromWorldRay, out RaycastResult pRaycast)
 {
     pRaycast.WorldPosition =
         RendererUtil.GetNearestWorldPositionOnPlane(pFromWorldRay, vWorldPlane);
     pRaycast.WorldRotation = transform.rotation;
     pRaycast.WorldPlane = vWorldPlane;
     return GetNearestWorldPosition(pRaycast.WorldPosition);
 }
コード例 #2
0
        /*--------------------------------------------------------------------------------------------*/
        public virtual Vector3 GetNearestWorldPosition(Ray pFromWorldRay, out RaycastResult pRaycast)
        {
            if ( ButtonRenderer != null ) {
                return ButtonRenderer.GetNearestWorldPosition(pFromWorldRay, out pRaycast);
            }

            if ( SliderRenderer != null ) {
                return SliderRenderer.GetNearestWorldPosition(pFromWorldRay, out pRaycast);
            }

            throw new Exception("No button or slider renderer.");
        }
コード例 #3
0
 /*--------------------------------------------------------------------------------------------*/
 public abstract Vector3 GetNearestWorldPosition(Ray pFromWorldRay, out RaycastResult pRaycast);
コード例 #4
0
 /*--------------------------------------------------------------------------------------------*/
 public override Vector3 GetNearestWorldPosition(Ray pFromWorldRay, out RaycastResult pRaycast)
 {
     return GetComponent<HoverShape>().GetNearestWorldPosition(pFromWorldRay, out pRaycast);
 }
コード例 #5
0
 /*--------------------------------------------------------------------------------------------*/
 public override Vector3 GetNearestWorldPosition(Ray pFromWorldRay, out RaycastResult pRaycast)
 {
     pRaycast = new RaycastResult();
     return Vector3.zero;
 }
コード例 #6
0
        /*--------------------------------------------------------------------------------------------*/
        public override Vector3 GetNearestWorldPosition(Ray pFromWorldRay, out RaycastResult pRaycast)
        {
            if ( AllowJump ) {
                return GetComponent<HoverShape>().GetNearestWorldPosition(pFromWorldRay, out pRaycast);
            }

            return HandleButton.GetShape().GetNearestWorldPosition(pFromWorldRay, out pRaycast);
        }