Beispiel #1
0
        /* Functions */

        protected override void Awake()
        {
            base.Awake();

            // get all function pointer/formula.
            this.mEasingRed   = JCS_Utility.GetEasing(mEaseTypeR);
            this.mEasingGreen = JCS_Utility.GetEasing(mEaseTypeG);
            this.mEasingBlue  = JCS_Utility.GetEasing(mEaseTypeB);
            this.mEasingAlpha = JCS_Utility.GetEasing(mEaseTypeA);
        }
Beispiel #2
0
        /// <summary>
        /// Tween to this vector either position, scale, rotation.
        /// </summary>
        /// <param name="from"> starting vector 3 </param>
        /// <param name="to"> target vector 3 </param>
        /// <param name="resetElapsedTime"> reset elapsed time? (default : true) </param>
        /// <param name="durationX"> how fast it tween on x axis. </param>
        /// <param name="durationY"> how fast it tween on y axis. </param>
        /// <param name="durationZ"> how fast it tween on z axis. </param>
        /// <param name="typeX"> easing type for x axis. </param>
        /// <param name="typeY"> easing type for y axis. </param>
        /// <param name="typeZ"> easing type for z axis. </param>
        /// <param name="callback"> callback function pointer. </param>
        public void DoTween(
            Vector3 from,
            Vector3 to,
            bool resetElapsedTime,
            float durationX,
            float durationY,
            float durationZ,
            JCS_TweenType typeX,
            JCS_TweenType typeY,
            JCS_TweenType typeZ,
            CallBackDelegate callback = null)
        {
            TweenDelegate easingX = JCS_Utility.GetEasing(typeX);
            TweenDelegate easingY = JCS_Utility.GetEasing(typeY);
            TweenDelegate easingZ = JCS_Utility.GetEasing(typeZ);

            StartTween(from, to, resetElapsedTime, durationX, durationY, durationZ, easingX, easingY, easingZ, callback);
        }