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); }
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); }
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); }
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); }
private static void ScaleFun(float t, FTransformTween tra) { tra.mTran.localScale = tra.mStartValue + tra.mEPValue * t; }
private static void EulerFun(float t, FTransformTween tra) { tra.mTran.localEulerAngles = tra.mStartValue + tra.mEPValue * t; }
private static void MoveFun(float t, FTransformTween tra) { tra.mTran.localPosition = tra.mStartValue + tra.mEPValue * t; }