Example #1
0
        static public UCL_TC_Move TC_LocalMove(this Transform target, Vector3 target_position)
        {
            var obj = UCL_TC_Move.Create();

            obj.SetLocal(true);
            return(obj.Init(target, target_position));
        }
Example #2
0
        static public UCL_TC_Move TC_LocalMove(this Transform target, float x, float y, float z)
        {
            var aTC = UCL_TC_Move.Create();

            aTC.SetLocal(true);
            return(aTC.Init(target, x, y, z));
        }
Example #3
0
        static public UCL_TC_Move TC_LocalMove(this Transform target, Transform target_transform)
        {
            var obj = UCL_TC_Move.Create();

            obj.SetLocal(true);
            return(obj.Init(target, target_transform));
        }
Example #4
0
 /// <summary>
 /// Move target to target_transform
 /// </summary>
 /// <param name="target"></param>
 /// <param name="target_transform"></param>
 /// <returns></returns>
 static public UCL_TC_Move TC_Move(this Transform target, Transform target_transform)
 {
     return(UCL_TC_Move.Create().Init(target, target_transform));
 }
Example #5
0
 /// <summary>
 /// Move target to Vector3(x,y,z)
 /// </summary>
 /// <param name="target"></param>
 /// <param name="x"></param>
 /// <param name="y"></param>
 /// <param name="z"></param>
 /// <returns></returns>
 static public UCL_TC_Move TC_Move(this Transform target, float x, float y, float z)
 {
     return(UCL_TC_Move.Create().Init(target, x, y, z));
 }
Example #6
0
 /// <summary>
 /// Move target to target_position
 /// </summary>
 /// <param name="target">move target</param>
 /// <param name="target_position">target position</param>
 /// <returns></returns>
 static public UCL_TC_Move TC_Move(this Transform target, Vector3 target_position)
 {
     return(UCL_TC_Move.Create().Init(target, target_position));
 }
Example #7
0
 /// <summary>
 /// Move target by offset
 /// </summary>
 /// <param name="iTarget">move target</param>
 /// <param name="iOffSet">offset</param>
 /// <returns></returns>
 static public UCL_TC_Move TC_MoveBy(this Transform iTarget, Vector3 iOffSet)
 {
     return(UCL_TC_Move.Create().Init(iTarget, iTarget.position + iOffSet));
 }
Example #8
0
        /// <summary>
        /// Move target by offset
        /// </summary>
        /// <param name="iTarget">move target</param>
        /// <param name="x">offset x</param>
        /// <param name="y">offset y</param>
        /// <param name="z">offset z</param>
        /// <returns></returns>
        static public UCL_TC_Move TC_MoveBy(this Transform iTarget, float x, float y, float z)
        {
            Vector3 aPos = iTarget.position;

            return(UCL_TC_Move.Create().Init(iTarget, aPos.x + x, aPos.y + y, aPos.z + z));
        }
Example #9
0
        public static UCL_TweenerComponent Create(TC_Type iType)
        {
            UCL_TweenerComponent aTC = null;

            switch (iType)
            {
            case TC_Type.Move: {
                aTC = UCL_TC_Move.Create();
                break;
            }

            case TC_Type.Rotate: {
                aTC = UCL_TC_Rotate.Create();
                break;
            }

            case TC_Type.LookAt: {
                aTC = UCL_TC_LookAt.Create();
                break;
            }

            case TC_Type.Curve: {
                aTC = UCL_TC_Curve.Create();
                break;
            }

            case TC_Type.Action: {
                aTC = UCL_TC_Action.Create();
                break;
            }

            case TC_Type.Shake: {
                aTC = UCL_TC_Shake.Create();
                break;
            }

            case TC_Type.Scale: {
                aTC = UCL_TC_Scale.Create();
                break;
            }

            case TC_Type.Jump: {
                aTC = UCL_TC_Jump.Create();
                break;
            }

            case TC_Type.EulerRotation:
            {
                aTC = UCL_TC_EulerRotation.Create();
                break;
            }

            case TC_Type.Color:
            {
                aTC = UCL_TC_Color.Create();
                break;
            }

            case TC_Type.TweenerComponent: {
                aTC = new UCL_TweenerComponent();
                break;
            }

            case TC_Type.RectTransform:
            {
                aTC = UCL_TC_RectTransform.Create();
                break;
            }

            default: {
                string type_name = "UCL.TweenLib.UCL_TC_" + iType.ToString();
                Type   tc_type   = Type.GetType(type_name);
                if (tc_type != null)
                {
                    aTC = Activator.CreateInstance(tc_type) as UCL_TweenerComponent;
                }
                else
                {
                    Debug.LogError("type_name:" + type_name + ", not exist!!");
                }
                break;
            }
            }
            if (aTC == null)
            {
                aTC = new UCL_TweenerComponent();
            }
            return(aTC);
        }