Пример #1
0
        /// <summary>
        /// Tween a "Look At" to a world position in Vector 3.
        /// </summary>
        /// <param name="transform">The transform that will look at.</param>
        /// <param name="lookAtPosition">The world position toward which the designated transform will look at.</param>
        /// <param name="smooth">A linear interpolation parameter. The closer to 0, the smaller the steps will be.</param>
        /// <returns></returns>
        public static TriTween TritLookAt(this Transform transform, Vector3 lookAtPosition, float smooth = .1f)
        {
            TriTween tween = new TriTween();

            tritMonoInstance.StartCoroutine(CoTrT.LookAtVector3(transform, lookAtPosition, smooth, value => tween = value));
            return(tween);
        }
Пример #2
0
        public static TriTween TritMoveEase(this Transform transform, Vector3 newValue, float smooth = .1f)
        {
            TriTween tween = new TriTween();

            tritMonoInstance.StartCoroutine(CoTrT.MoveEase(transform, newValue, smooth, value => tween = value));
            return(tween);
        }
Пример #3
0
        /// <summary>
        /// Tween a Rotation to the orientation.
        /// </summary>
        /// <param name="transform">The transform that will rotate.</param>
        /// <param name="orientation">The rotation in euler angles which the transform will tween to</param>
        /// <param name="smooth">A linear interpolation parameter. The closer to 0, the smaller the steps will be.</param>
        public static TriTween TritRotate(this Transform transform, Vector3 orientation, float smooth = .1f)
        {
            TriTween tween = new TriTween();

            tritMonoInstance.StartCoroutine(CoTrT.Rotate(transform, orientation, smooth, value => tween = value));
            return(tween);
        }
Пример #4
0
 /// <summary>
 /// Tween a slider value.
 /// </summary>
 /// <param name="slider">The slider that will move.</param>
 /// <param name="newValue">The new value of the slider</param>
 /// <param name="smooth">A linear interpolation parameter. The closer to 0, the smaller the steps will be.</param>
 public static void TritSlideValue(this Slider slider, float newValue, float smooth = .1f)
 {
     //TriTween tween = new TriTween();
     slider.StartCoroutine(CoTrT.SlideValue(slider, newValue, smooth));
     //return tween;
 }