示例#1
0
        public static FTweenTool FORotate(this Transform obj, Vector3 ep, bool IsRelative = false)
        {
            var tranTween = new FTransformTween(ep, obj, FTransformTween.FTranTweenType.TT_Rot, IsRelative, FTransformTween.FTranXYZType.F_XYZ);
            var tween     = CreateFTween(tranTween, obj);

            return(tween);
        }
示例#2
0
        public static FTweenTool FORotateZ(this Transform obj, float z, bool IsRelative = false)
        {
            var vec = obj.transform.localEulerAngles;

            vec.z = z;
            var tranTween = new FTransformTween(vec, obj, FTransformTween.FTranTweenType.TT_Rot, IsRelative, FTransformTween.FTranXYZType.F_Z);
            var tween     = CreateFTween(tranTween, obj);

            return(tween);
        }
示例#3
0
        public static FTweenTool FOMoveY(this Transform obj, float y, bool IsRelative = false)
        {
            var vec = obj.transform.localPosition;

            vec.y = y;
            var tranTween = new FTransformTween(vec, obj, FTransformTween.FTranTweenType.TT_Move, IsRelative, FTransformTween.FTranXYZType.F_Y);
            var tween     = CreateFTween(tranTween, obj);

            return(tween);
        }
示例#4
0
        public static FTweenTool FOScaleZ(this Transform obj, float z, bool IsRelative = false)
        {
            Vector3 vec = obj.transform.localScale;

            vec.z = z;
            var tranTween = new FTransformTween(vec, obj, FTransformTween.FTranTweenType.TT_Scale, IsRelative, FTransformTween.FTranXYZType.F_Z);
            var tween     = CreateFTween(tranTween, obj);

            return(tween);
        }
示例#5
0
 private static void ScaleFun(float t, FTransformTween tra)
 {
     tra.mTran.localScale = tra.mStartValue + tra.mEPValue * t;
 }
示例#6
0
 private static void EulerFun(float t, FTransformTween tra)
 {
     tra.mTran.localEulerAngles = tra.mStartValue + tra.mEPValue * t;
 }
示例#7
0
 private static void MoveFun(float t, FTransformTween tra)
 {
     tra.mTran.localPosition = tra.mStartValue + tra.mEPValue * t;
 }