public static TweenRotation Rotate(this Transform transform, Quaternion from, Quaternion to, float duration, bool worldSpace = true) { var eulerFrom = from.eulerAngles; var eulerTo = to.eulerAngles; var tween = UTween.Rotation(transform, eulerFrom, eulerTo, duration, worldSpace); return(tween); }
public static TweenValue Value(Quaternion from, Quaternion to, float duration, Action <Quaternion> action) { var tween = UTween.Value(0f, 1f, duration, value => { var quaternion = Quaternion.LerpUnclamped(from, to, value); action(quaternion); }); return(tween); }
public static TweenValue Value(Vector4 from, Vector4 to, float duration, Action <Vector4> action) { var tween = UTween.Value(0f, 1f, duration, value => { var vector = Vector4.LerpUnclamped(from, to, value); action(vector); }); return(tween); }
public static TweenValue Value(Color from, Color to, float duration, Action <Color> action) { var tween = UTween.Value(0f, 1f, duration, value => { var color = UnityEngine.Color.LerpUnclamped(from, to, value); action(color); }); return(tween); }
public static TweenValue Value(int from, int to, float duration, Action <int> action) { var tween = UTween.Value(0f, 1f, duration, value => { var result = (int)Mathf.LerpUnclamped(from, to, value); action(result); }); return(tween); }
public static TweenValue Alpha(this Material material, string propertyName, float from, float to, float duration) { var tween = UTween.Value(from, to, duration, value => { var color = material.GetColor(propertyName); color.a = value; material.SetColor(propertyName, color); }); return(tween); }
public static TweenValue Value(string text, float from, float to, float duration, bool enableRichText, Action <string> action) { from = Mathf.Clamp01(from); to = Mathf.Clamp01(to); var tween = UTween.Value(from, to, duration, value => { var str = LerpUtil.Lerp(text, value, enableRichText); action(str); }); return(tween); }
public static TweenValue Value(Rect from, Rect to, float duration, Action <Rect> action) { var tween = UTween.Value(0f, 1f, duration, value => { var x = Mathf.LerpUnclamped(from.x, to.x, value); var y = Mathf.LerpUnclamped(from.y, to.y, value); var width = Mathf.LerpUnclamped(from.width, to.width, value); var height = Mathf.LerpUnclamped(from.height, to.height, value); var rect = new Rect(x, y, width, height); action(rect); }); return(tween); }
public static TweenWidth Width(this RectTransform rectTransform, float from, float to, float duration) { var tween = UTween.Width(rectTransform, from, to, duration); return(tween); }
public static TweenValue Color(this Material material, string propertyName, Color from, Color to, float duration) { var tween = UTween.Value(from, to, duration, value => { material.SetColor(propertyName, value); }); return(tween); }
public static TweenValue Tilling(this Material material, string textureName, Vector2 from, Vector2 to, float duration) { var tween = UTween.Value(from, to, duration, value => { material.SetTextureScale(textureName, value); }); return(tween); }
public static TweenShake Shake(this Transform transform, TweenShakeArgs shakeArgs, float duration, bool worldSpace = true) { var tween = UTween.Shake(transform, shakeArgs, duration, worldSpace); return(tween); }
public static TweenShake Shake(this Transform transform, Vector3 powerPos, Vector3 powerRot, Vector3 powerScale, int count, float duration, bool worldSpace = true) { var tween = UTween.Shake(transform, powerPos, powerRot, powerScale, count, duration, worldSpace); return(tween); }
public static TweenScale Scale(this Transform transform, Vector3 from, Vector3 to, float duration) { var tween = UTween.Scale(transform, from, to, duration); return(tween); }
public static TweenPositionUGUI PositionUGUI(this RectTransform rectTransform, Vector2 from, Vector2 to, float duration) { var tween = UTween.PositionUGUI(rectTransform, from, to, duration); return(tween); }
public static TweenSize Size(this RectTransform rectTransform, Vector2 from, Vector2 to, float duration) { var tween = UTween.Size(rectTransform, from, to, duration); return(tween); }
public static TweenValue Float(this Material material, string propertyName, float from, float to, float duration) { var tween = UTween.Value(from, to, duration, value => { material.SetFloat(propertyName, value); }); return(tween); }
public static TweenHeight Height(this RectTransform rectTransform, float from, float to, float duration) { var tween = UTween.Height(rectTransform, from, to, duration); return(tween); }
public static TweenRotation Rotate(this Transform transform, Vector3 from, Vector3 to, float duration, bool worldSpace = true) { var tween = UTween.Rotation(transform, from, to, duration, worldSpace); return(tween); }