1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2026-02-04 14:24:55 +08:00

Added DOAnchorPosX/Y + Fixed bug with myTween.Complete and Strip Byte Code

This commit is contained in:
Demigiant 2015-10-06 00:47:35 +02:00
parent e2b5ae40a6
commit afa90db39e
59 changed files with 106 additions and 9 deletions

1
.gitignore vendored
View File

@ -26,3 +26,4 @@ ExternalPluginsTestsAndExamples*
*HOTools* *HOTools*
zz builds zz builds
zz UnityTests* zz UnityTests*
*.tmp

View File

@ -912,6 +912,9 @@
Methods that extend Tween objects and allow to control or get data from them Methods that extend Tween objects and allow to control or get data from them
</summary> </summary>
</member> </member>
<member name="M:DG.Tweening.TweenExtensions.Complete(DG.Tweening.Tween)">
<summary>Completes the tween</summary>
</member>
<member name="M:DG.Tweening.TweenExtensions.Complete(DG.Tweening.Tween,System.Boolean)"> <member name="M:DG.Tweening.TweenExtensions.Complete(DG.Tweening.Tween,System.Boolean)">
<summary>Completes the tween</summary> <summary>Completes the tween</summary>
<param name="withCallbacks">For Sequences only: if TRUE also internal Sequence callbacks will be fired, <param name="withCallbacks">For Sequences only: if TRUE also internal Sequence callbacks will be fired,

View File

@ -35,7 +35,7 @@
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions43.DOGradientColor(UnityEngine.SpriteRenderer,UnityEngine.Gradient,System.Single)"> <member name="M:DG.Tweening.ShortcutExtensions43.DOGradientColor(UnityEngine.SpriteRenderer,UnityEngine.Gradient,System.Single)">
<summary>Tweens a SpriteRenderer's colors using the given gradient <summary>Tweens a SpriteRenderer's color using the given gradient
(NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener).
Also stores the image as the tween's target so it can be used for filtered operations</summary> Also stores the image as the tween's target so it can be used for filtered operations</summary>
<param name="gradient">The gradient to use</param><param name="duration">The duration of the tween</param> <param name="gradient">The gradient to use</param><param name="duration">The duration of the tween</param>

View File

@ -96,6 +96,18 @@
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param> <param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPosX(UnityEngine.RectTransform,System.Single,System.Single,System.Boolean)">
<summary>Tweens a RectTransform's anchoredPosition X to the given value.
Also stores the RectTransform 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="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPosY(UnityEngine.RectTransform,System.Single,System.Single,System.Boolean)">
<summary>Tweens a RectTransform's anchoredPosition Y to the given value.
Also stores the RectTransform 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="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPos3D(UnityEngine.RectTransform,UnityEngine.Vector3,System.Single,System.Boolean)"> <member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPos3D(UnityEngine.RectTransform,UnityEngine.Vector3,System.Single,System.Boolean)">
<summary>Tweens a RectTransform's anchoredPosition3D to the given value. <summary>Tweens a RectTransform's anchoredPosition3D to the given value.
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary> Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>

View File

@ -912,6 +912,9 @@
Methods that extend Tween objects and allow to control or get data from them Methods that extend Tween objects and allow to control or get data from them
</summary> </summary>
</member> </member>
<member name="M:DG.Tweening.TweenExtensions.Complete(DG.Tweening.Tween)">
<summary>Completes the tween</summary>
</member>
<member name="M:DG.Tweening.TweenExtensions.Complete(DG.Tweening.Tween,System.Boolean)"> <member name="M:DG.Tweening.TweenExtensions.Complete(DG.Tweening.Tween,System.Boolean)">
<summary>Completes the tween</summary> <summary>Completes the tween</summary>
<param name="withCallbacks">For Sequences only: if TRUE also internal Sequence callbacks will be fired, <param name="withCallbacks">For Sequences only: if TRUE also internal Sequence callbacks will be fired,

View File

@ -35,7 +35,7 @@
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions43.DOGradientColor(UnityEngine.SpriteRenderer,UnityEngine.Gradient,System.Single)"> <member name="M:DG.Tweening.ShortcutExtensions43.DOGradientColor(UnityEngine.SpriteRenderer,UnityEngine.Gradient,System.Single)">
<summary>Tweens a SpriteRenderer's colors using the given gradient <summary>Tweens a SpriteRenderer's color using the given gradient
(NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener).
Also stores the image as the tween's target so it can be used for filtered operations</summary> Also stores the image as the tween's target so it can be used for filtered operations</summary>
<param name="gradient">The gradient to use</param><param name="duration">The duration of the tween</param> <param name="gradient">The gradient to use</param><param name="duration">The duration of the tween</param>

View File

@ -96,6 +96,18 @@
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param> <param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPosX(UnityEngine.RectTransform,System.Single,System.Single,System.Boolean)">
<summary>Tweens a RectTransform's anchoredPosition X to the given value.
Also stores the RectTransform 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="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPosY(UnityEngine.RectTransform,System.Single,System.Single,System.Boolean)">
<summary>Tweens a RectTransform's anchoredPosition Y to the given value.
Also stores the RectTransform 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="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPos3D(UnityEngine.RectTransform,UnityEngine.Vector3,System.Single,System.Boolean)"> <member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPos3D(UnityEngine.RectTransform,UnityEngine.Vector3,System.Single,System.Boolean)">
<summary>Tweens a RectTransform's anchoredPosition3D to the given value. <summary>Tweens a RectTransform's anchoredPosition3D to the given value.
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary> Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>

View File

@ -912,6 +912,9 @@
Methods that extend Tween objects and allow to control or get data from them Methods that extend Tween objects and allow to control or get data from them
</summary> </summary>
</member> </member>
<member name="M:DG.Tweening.TweenExtensions.Complete(DG.Tweening.Tween)">
<summary>Completes the tween</summary>
</member>
<member name="M:DG.Tweening.TweenExtensions.Complete(DG.Tweening.Tween,System.Boolean)"> <member name="M:DG.Tweening.TweenExtensions.Complete(DG.Tweening.Tween,System.Boolean)">
<summary>Completes the tween</summary> <summary>Completes the tween</summary>
<param name="withCallbacks">For Sequences only: if TRUE also internal Sequence callbacks will be fired, <param name="withCallbacks">For Sequences only: if TRUE also internal Sequence callbacks will be fired,

View File

@ -35,7 +35,7 @@
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions43.DOGradientColor(UnityEngine.SpriteRenderer,UnityEngine.Gradient,System.Single)"> <member name="M:DG.Tweening.ShortcutExtensions43.DOGradientColor(UnityEngine.SpriteRenderer,UnityEngine.Gradient,System.Single)">
<summary>Tweens a SpriteRenderer's colors using the given gradient <summary>Tweens a SpriteRenderer's color using the given gradient
(NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener).
Also stores the image as the tween's target so it can be used for filtered operations</summary> Also stores the image as the tween's target so it can be used for filtered operations</summary>
<param name="gradient">The gradient to use</param><param name="duration">The duration of the tween</param> <param name="gradient">The gradient to use</param><param name="duration">The duration of the tween</param>

View File

@ -96,6 +96,18 @@
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param> <param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPosX(UnityEngine.RectTransform,System.Single,System.Single,System.Boolean)">
<summary>Tweens a RectTransform's anchoredPosition X to the given value.
Also stores the RectTransform 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="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPosY(UnityEngine.RectTransform,System.Single,System.Single,System.Boolean)">
<summary>Tweens a RectTransform's anchoredPosition Y to the given value.
Also stores the RectTransform 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="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPos3D(UnityEngine.RectTransform,UnityEngine.Vector3,System.Single,System.Boolean)"> <member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPos3D(UnityEngine.RectTransform,UnityEngine.Vector3,System.Single,System.Boolean)">
<summary>Tweens a RectTransform's anchoredPosition3D to the given value. <summary>Tweens a RectTransform's anchoredPosition3D to the given value.
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary> Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>

View File

@ -1,2 +1,2 @@
m_EditorVersion: 5.2.0f3 m_EditorVersion: 5.2.1f1
m_StandardAssetsVersion: 0 m_StandardAssetsVersion: 0

View File

@ -32,7 +32,7 @@ namespace DG.Tweening
public class DOTween public class DOTween
{ {
/// <summary>DOTween's version</summary> /// <summary>DOTween's version</summary>
public static readonly string Version = "1.0.850"; public static readonly string Version = "1.0.865";
/////////////////////////////////////////////// ///////////////////////////////////////////////
// Options //////////////////////////////////// // Options ////////////////////////////////////

View File

@ -24,10 +24,28 @@ namespace DG.Tweening
#region Runtime Operations #region Runtime Operations
// /// <summary>Completes the tween</summary>
// /// <param name="withCallbacks">For Sequences only: if TRUE also internal Sequence callbacks will be fired,
// /// otherwise they will be ignored</param>
// public static void Complete(this Tween t, bool withCallbacks = false)
// {
// if (t == null) {
// if (Debugger.logPriority > 1) Debugger.LogNullTween(t); return;
// } else if (!t.active) {
// if (Debugger.logPriority > 1) Debugger.LogInvalidTween(t); return;
// } else if (t.isSequenced) {
// if (Debugger.logPriority > 1) Debugger.LogNestedTween(t); return;
// }
//
// TweenManager.Complete(t, true, withCallbacks ? UpdateMode.Update : UpdateMode.Goto);
// }
/// <summary>Completes the tween</summary>
public static void Complete(this Tween t)
{ Complete(t, false); }
/// <summary>Completes the tween</summary> /// <summary>Completes the tween</summary>
/// <param name="withCallbacks">For Sequences only: if TRUE also internal Sequence callbacks will be fired, /// <param name="withCallbacks">For Sequences only: if TRUE also internal Sequence callbacks will be fired,
/// otherwise they will be ignored</param> /// otherwise they will be ignored</param>
public static void Complete(this Tween t, bool withCallbacks = false) public static void Complete(this Tween t, bool withCallbacks)
{ {
if (t == null) { if (t == null) {
if (Debugger.logPriority > 1) Debugger.LogNullTween(t); return; if (Debugger.logPriority > 1) Debugger.LogNullTween(t); return;

View File

@ -85,7 +85,7 @@ namespace DG.Tweening
.SetTarget(target); .SetTarget(target);
} }
/// <summary>Tweens a SpriteRenderer's colors using the given gradient /// <summary>Tweens a SpriteRenderer's color using the given gradient
/// (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). /// (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener).
/// Also stores the image as the tween's target so it can be used for filtered operations</summary> /// Also stores the image as the tween's target so it can be used for filtered operations</summary>
/// <param name="gradient">The gradient to use</param><param name="duration">The duration of the tween</param> /// <param name="gradient">The gradient to use</param><param name="duration">The duration of the tween</param>

View File

@ -207,6 +207,24 @@ namespace DG.Tweening
return DOTween.To(() => target.anchoredPosition, x => target.anchoredPosition = x, endValue, duration) return DOTween.To(() => target.anchoredPosition, x => target.anchoredPosition = x, endValue, duration)
.SetOptions(snapping).SetTarget(target); .SetOptions(snapping).SetTarget(target);
} }
/// <summary>Tweens a RectTransform's anchoredPosition X to the given value.
/// Also stores the RectTransform 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="snapping">If TRUE the tween will smoothly snap all values to integers</param>
public static Tweener DOAnchorPosX(this RectTransform target, float endValue, float duration, bool snapping = false)
{
return DOTween.To(() => target.anchoredPosition, x => target.anchoredPosition = x, new Vector2(endValue, 0), duration)
.SetOptions(AxisConstraint.X, snapping).SetTarget(target);
}
/// <summary>Tweens a RectTransform's anchoredPosition Y to the given value.
/// Also stores the RectTransform 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="snapping">If TRUE the tween will smoothly snap all values to integers</param>
public static Tweener DOAnchorPosY(this RectTransform target, float endValue, float duration, bool snapping = false)
{
return DOTween.To(() => target.anchoredPosition, x => target.anchoredPosition = x, new Vector2(0, endValue), duration)
.SetOptions(AxisConstraint.Y, snapping).SetTarget(target);
}
/// <summary>Tweens a RectTransform's anchoredPosition3D to the given value. /// <summary>Tweens a RectTransform's anchoredPosition3D to the given value.
/// Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary> /// Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>

View File

@ -912,6 +912,9 @@
Methods that extend Tween objects and allow to control or get data from them Methods that extend Tween objects and allow to control or get data from them
</summary> </summary>
</member> </member>
<member name="M:DG.Tweening.TweenExtensions.Complete(DG.Tweening.Tween)">
<summary>Completes the tween</summary>
</member>
<member name="M:DG.Tweening.TweenExtensions.Complete(DG.Tweening.Tween,System.Boolean)"> <member name="M:DG.Tweening.TweenExtensions.Complete(DG.Tweening.Tween,System.Boolean)">
<summary>Completes the tween</summary> <summary>Completes the tween</summary>
<param name="withCallbacks">For Sequences only: if TRUE also internal Sequence callbacks will be fired, <param name="withCallbacks">For Sequences only: if TRUE also internal Sequence callbacks will be fired,

Binary file not shown.

Binary file not shown.

View File

@ -35,7 +35,7 @@
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions43.DOGradientColor(UnityEngine.SpriteRenderer,UnityEngine.Gradient,System.Single)"> <member name="M:DG.Tweening.ShortcutExtensions43.DOGradientColor(UnityEngine.SpriteRenderer,UnityEngine.Gradient,System.Single)">
<summary>Tweens a SpriteRenderer's colors using the given gradient <summary>Tweens a SpriteRenderer's color using the given gradient
(NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener).
Also stores the image as the tween's target so it can be used for filtered operations</summary> Also stores the image as the tween's target so it can be used for filtered operations</summary>
<param name="gradient">The gradient to use</param><param name="duration">The duration of the tween</param> <param name="gradient">The gradient to use</param><param name="duration">The duration of the tween</param>

Binary file not shown.

View File

@ -96,6 +96,18 @@
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param> <param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPosX(UnityEngine.RectTransform,System.Single,System.Single,System.Boolean)">
<summary>Tweens a RectTransform's anchoredPosition X to the given value.
Also stores the RectTransform 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="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPosY(UnityEngine.RectTransform,System.Single,System.Single,System.Boolean)">
<summary>Tweens a RectTransform's anchoredPosition Y to the given value.
Also stores the RectTransform 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="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPos3D(UnityEngine.RectTransform,UnityEngine.Vector3,System.Single,System.Boolean)"> <member name="M:DG.Tweening.ShortcutExtensions46.DOAnchorPos3D(UnityEngine.RectTransform,UnityEngine.Vector3,System.Single,System.Boolean)">
<summary>Tweens a RectTransform's anchoredPosition3D to the given value. <summary>Tweens a RectTransform's anchoredPosition3D to the given value.
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary> Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>

Binary file not shown.