public static GetEasing ( JCS_TweenType type ) : TweenDelegate | ||
type | JCS_TweenType | type of the tween formula |
return | TweenDelegate |
/* Functions */ protected override void Awake() { base.Awake(); // get all function pointer/formula. this.mEasingRed = JCS_Util.GetEasing(mEaseTypeR); this.mEasingGreen = JCS_Util.GetEasing(mEaseTypeG); this.mEasingBlue = JCS_Util.GetEasing(mEaseTypeB); this.mEasingAlpha = JCS_Util.GetEasing(mEaseTypeA); }
/// <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, EmptyFunction callback = null) { TweenDelegate easingX = JCS_Util.GetEasing(typeX); TweenDelegate easingY = JCS_Util.GetEasing(typeY); TweenDelegate easingZ = JCS_Util.GetEasing(typeZ); StartTween(from, to, resetElapsedTime, durationX, durationY, durationZ, easingX, easingY, easingZ, callback); }