/// <summary>Tweens a Rigidbody's rotation to the given value. /// Also stores the rigidbody as the tween's target so it can be used for filtered operations</summary> /// <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> /// <param name="mode">Rotation mode</param> public static Tweener DORotate(this Rigidbody target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast) { TweenerCore<Quaternion, Vector3, QuaternionOptions> t = DOTween.To(() => target.rotation, target.MoveRotation, endValue, duration); t.SetTarget(target); t.plugOptions.rotateMode = mode; return t; }
/// <summary>Tweens a Transform's localRotation to the given value. /// Also stores the transform as the tween's target so it can be used for filtered operations</summary> /// <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> /// <param name="mode">Rotation mode</param> public static Tweener DOLocalRotate(this Transform target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast) { TweenerCore<Quaternion, Vector3, QuaternionOptions> t = DOTween.To(() => target.localRotation, x => target.localRotation = x, endValue, duration); t.SetTarget(target); t.plugOptions.rotateMode = mode; return t; }
/// <summary>EXPERIMENTAL METHOD - Tweens a Transform's lcoalRotation BY the given value (as if you chained a <code>SetRelative</code>), /// in a way that allows other DOBlendableRotate tweens to work together on the same target, /// instead than fight each other as multiple DORotate would do. /// Also stores the transform as the tween's target so it can be used for filtered operations</summary> /// <param name="byValue">The value to tween by</param><param name="duration">The duration of the tween</param> /// <param name="mode">Rotation mode</param> public static Tweener DOBlendableLocalRotateBy(this Transform target, Vector3 byValue, float duration, RotateMode mode = RotateMode.Fast) { Quaternion to = target.localRotation; TweenerCore<DOQuaternion, DOVector3, QuaternionOptions> t = DOTween.To(() => to, x => { #if COMPATIBLE Quaternion diff = x.value * Quaternion.Inverse(to); #else Quaternion diff = x * Quaternion.Inverse(to); #endif to = x; target.localRotation = target.localRotation * Quaternion.Inverse(target.localRotation) * diff * target.localRotation; }, byValue, duration) .Blendable().SetTarget(target); t.plugOptions.rotateMode = mode; return t; }
/// <summary>Tweens a Rigidbody's rotation to the given value. /// Also stores the rigidbody as the tween's target so it can be used for filtered operations</summary> /// <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> /// <param name="mode">Rotation mode</param> public static Tweener DORotate(this Rigidbody target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast) { #if COMPATIBLE TweenerCore<QuaternionWrapper, Vector3Wrapper, QuaternionOptions> t = DOTween.To(() => target.rotation, x => target.MoveRotation(x), endValue, duration); #else TweenerCore<Quaternion, Vector3, QuaternionOptions> t = DOTween.To(() => target.rotation, target.MoveRotation, endValue, duration); #endif t.SetTarget(target); t.plugOptions.rotateMode = mode; return t; }
void BeginDragRotate(Vector2 ptStart, RotateMode rotMode) { m_RotateMode = rotMode; m_startDragMouseLoc = ptStart; m_degStarDragSpin = m_currView.degSpinRotation; m_startDragOrient = m_currView.orient; m_bIsDragging = true; }
internal static Image RotateImage(Image myImage, RotateMode myRotatemode) { var ret = myImage; switch (myRotatemode) { case RotateMode.Ninetee: ret.RotateFlip(RotateFlipType.Rotate90FlipNone); break; case RotateMode.OneHundretEighty: ret.RotateFlip(RotateFlipType.Rotate180FlipNone); break; case RotateMode.TwoHundredSeventy: ret.RotateFlip(RotateFlipType.Rotate270FlipNone); break; } return ret; }
public override void Default() { FrameRotateMode = 0; }
public static Tweener DORotate(Transform target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast, float delay = 0, System.Action doComplete = null) { Tweener tweener = target.DORotate(endValue, duration, mode); SetTweenerComplete(tweener, delay, doComplete); return tweener; }
public void UploadText(int FontHeight, string FontName, string Data, int TextWidth, FontWeight Dark, RotateMode Rotate, string Name) { // Delete Image EZioApi.sendcommand("~MDELG," + Name); // Upload Text Image EZioApi.ecTextDownLoad(FontHeight, FontName, Data, TextWidth, (int)Dark, (int)Rotate, Name); }
/// <summary>Tweens a Rigidbody's rotation to the given value. /// Also stores the rigidbody as the tween's target so it can be used for filtered operations</summary> /// <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> /// <param name="mode">Rotation mode</param> public static TweenerCore <Quaternion, Vector3, QuaternionOptions> DORotate(this Rigidbody target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast) { TweenerCore <Quaternion, Vector3, QuaternionOptions> t = DOTween.To(() => target.rotation, target.MoveRotation, endValue, duration); t.SetTarget(target); t.plugOptions.rotateMode = mode; return(t); }
public int PrintText_Unicode(int PosX, int PosY, int FontHeight, string FontName, string Data, int TextWidth, FontWeight Dark, RotateMode Rotate, Italic_State Italic, Underline_State Underline, Strikeout_State Strikeout, Inverse_State Inverse) { byte[] ByteData = Encoding.Unicode.GetBytes(Data); return(EZioApi.ecTextOutFineW(PosX, PosY, FontHeight, FontName, ByteData, TextWidth, (int)Dark, (int)Rotate, (int)Italic, (int)Underline, (int)Strikeout, (int)Inverse, Data.Length)); }
public int PrintText_Unicode(int PosX, int PosY, int FontHeight, string FontName, string Data, int TextWidth, FontWeight Dark, RotateMode Rotate) { byte[] ByteData = Encoding.Unicode.GetBytes(Data); return(EZioApi.ecTextOutRW(PosX, PosY, FontHeight, FontName, ByteData, TextWidth, (int)Dark, (int)Rotate, Data.Length)); }
public int PrintText(int PosX, int PosY, int FontHeight, string FontName, string Data, int TextWidth, FontWeight Dark, RotateMode Rotate, Italic_State Italic, Underline_State Underline, Strikeout_State Strikeout, Inverse_State Inverse) { return(EZioApi.ecTextOutFine(PosX, PosY, FontHeight, FontName, Data, TextWidth, (int)Dark, (int)Rotate, (int)Italic, (int)Underline, (int)Strikeout, (int)Inverse)); }
public int PrintText(int PosX, int PosY, int FontHeight, string FontName, string Data, int TextWidth, FontWeight Dark, RotateMode Rotate) { return(EZioApi.ecTextOutR(PosX, PosY, FontHeight, FontName, Data, TextWidth, (int)Dark, (int)Rotate)); }
public static Tweener DORotate(Transform target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast, float delay = 0, System.Action doComplete = null) { Tweener tweener = target.DORotate(endValue, duration, mode); SetTweenerComplete(tweener, delay, doComplete); return(tweener); }