public SplineOrientationSettings(SplineOrientationSettings inSource)
 {
     Mode           = inSource.Mode;
     DirectionMask  = inSource.DirectionMask;
     UpVector       = inSource.UpVector;
     CustomCallback = inSource.CustomCallback;
 }
예제 #2
0
        public SplineTweenSettings(SplineTweenSettings inSource)
        {
            LerpMethod     = inSource.LerpMethod;
            SegmentEase    = inSource.SegmentEase;
            UpdateCallback = inSource.UpdateCallback;

            Offset = inSource.Offset;

            Orient = new SplineOrientationSettings(inSource.Orient);
        }
예제 #3
0
        /// <summary>
        /// Aligns a RectTransform to a point along the spline, using anchoredPosition.
        /// </summary>
        static public void AlignAnchorPos(ISpline inSpline, RectTransform inTransform, float inPercent, Axis inAxis, SplineLerp inLerpMethod, Curve inSegmentEase, SplineOrientationSettings inOrientation)
        {
            SplineUpdateInfo info;

            GetUpdateInfo(inSpline, inPercent, inLerpMethod, inSegmentEase, out info);
            inTransform.SetAnchorPos(info.Point, inAxis);
            if (inOrientation != null)
            {
                inOrientation.Apply(ref info, inTransform, Space.Self);
            }
        }