예제 #1
0
 /// <summary>
 /// Create a tweener do TC_Shake on target transform
 /// </summary>
 /// <param name="_Range">Max Range of shake</param>
 /// <param name="_ShakeTimes">shaking times</param>
 /// <param name="_fade">shaking will fade if true</param>
 /// <param name="_seed">use seed to control the random shake position</param>
 static public UCL_Tweener UCL_Shake(this Transform target, float duration,
                                     float _Range, int _ShakeTimes, int _seed, bool _fade = true)
 {
     return(LibTween.Tweener(duration).AddComponent(TC_Shake(target, _Range, _ShakeTimes, _seed, _fade)));
 }
예제 #2
0
 /// <summary>
 /// Create a Tweener contains TC_Jump
 /// </summary>
 /// <param name="iDuration">duration of tweener</param>
 /// <param name="iTarget">Move target</param>
 /// <param name="iTargetPosition">Target position that target will move to</param>
 /// <param name="iJumpTimes">Jump times</param>
 /// <param name="iUp">Up vector of jump , etc. (0,1,0)</param>
 /// <param name="iHeight">Initial Jump height</param>
 /// <param name="iBounciness">Height decade after each jump, if == 1 then the height stay the same each jump</param>
 /// <returns></returns>
 static public UCL_Tweener UCL_Jump(this Transform iTarget, float iDuration, Vector3 iTargetPosition, int iJumpTimes,
                                    Vector3 iUp, float iHeight, float iBounciness)
 {
     return(LibTween.Tweener(iDuration).AddComponent(TC_Jump(iTarget, iTargetPosition, iJumpTimes, iUp, iHeight, iBounciness)));
 }