1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-20 09:16:02 +08:00

- Implemented support for long and ulong formats

- Fixed IsTweening returning TRUE if called inside a tween's OnComplete
This commit is contained in:
Daniele Giardini 2015-03-31 10:02:15 +02:00
parent ebb076e47f
commit ea7a7a7cfd
41 changed files with 295 additions and 25 deletions

View File

@ -1442,6 +1442,22 @@
<para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
<param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
</member>
<member name="M:DG.Tweening.DOTween.To(DG.Tweening.Core.DOGetter{System.Int64},DG.Tweening.Core.DOSetter{System.Int64},System.Int64,System.Single)">
<summary>Tweens a property or field to the given value using default plugins</summary>
<param name="getter">A getter for the field or property to tween.
<para>Example usage with lambda:</para><code>()=> myProperty</code></param>
<param name="setter">A setter for the field or property to tween
<para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
<param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
</member>
<member name="M:DG.Tweening.DOTween.To(DG.Tweening.Core.DOGetter{System.UInt64},DG.Tweening.Core.DOSetter{System.UInt64},System.UInt64,System.Single)">
<summary>Tweens a property or field to the given value using default plugins</summary>
<param name="getter">A getter for the field or property to tween.
<para>Example usage with lambda:</para><code>()=> myProperty</code></param>
<param name="setter">A setter for the field or property to tween
<para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
<param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
</member>
<member name="M:DG.Tweening.DOTween.To(DG.Tweening.Core.DOGetter{System.String},DG.Tweening.Core.DOSetter{System.String},System.String,System.Single)">
<summary>Tweens a property or field to the given value using default plugins</summary>
<param name="getter">A getter for the field or property to tween.

View File

@ -1442,6 +1442,22 @@
<para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
<param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
</member>
<member name="M:DG.Tweening.DOTween.To(DG.Tweening.Core.DOGetter{System.Int64},DG.Tweening.Core.DOSetter{System.Int64},System.Int64,System.Single)">
<summary>Tweens a property or field to the given value using default plugins</summary>
<param name="getter">A getter for the field or property to tween.
<para>Example usage with lambda:</para><code>()=> myProperty</code></param>
<param name="setter">A setter for the field or property to tween
<para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
<param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
</member>
<member name="M:DG.Tweening.DOTween.To(DG.Tweening.Core.DOGetter{System.UInt64},DG.Tweening.Core.DOSetter{System.UInt64},System.UInt64,System.Single)">
<summary>Tweens a property or field to the given value using default plugins</summary>
<param name="getter">A getter for the field or property to tween.
<para>Example usage with lambda:</para><code>()=> myProperty</code></param>
<param name="setter">A setter for the field or property to tween
<para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
<param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
</member>
<member name="M:DG.Tweening.DOTween.To(DG.Tweening.Core.DOGetter{System.String},DG.Tweening.Core.DOSetter{System.String},System.String,System.Single)">
<summary>Tweens a property or field to the given value using default plugins</summary>
<param name="getter">A getter for the field or property to tween.

View File

@ -1442,6 +1442,22 @@
<para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
<param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
</member>
<member name="M:DG.Tweening.DOTween.To(DG.Tweening.Core.DOGetter{System.Int64},DG.Tweening.Core.DOSetter{System.Int64},System.Int64,System.Single)">
<summary>Tweens a property or field to the given value using default plugins</summary>
<param name="getter">A getter for the field or property to tween.
<para>Example usage with lambda:</para><code>()=> myProperty</code></param>
<param name="setter">A setter for the field or property to tween
<para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
<param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
</member>
<member name="M:DG.Tweening.DOTween.To(DG.Tweening.Core.DOGetter{System.UInt64},DG.Tweening.Core.DOSetter{System.UInt64},System.UInt64,System.Single)">
<summary>Tweens a property or field to the given value using default plugins</summary>
<param name="getter">A getter for the field or property to tween.
<para>Example usage with lambda:</para><code>()=> myProperty</code></param>
<param name="setter">A setter for the field or property to tween
<para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
<param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
</member>
<member name="M:DG.Tweening.DOTween.To(DG.Tweening.Core.DOGetter{System.String},DG.Tweening.Core.DOSetter{System.String},System.String,System.Single)">
<summary>Tweens a property or field to the given value using default plugins</summary>
<param name="getter">A getter for the field or property to tween.

View File

@ -23,17 +23,41 @@ public class ExternalPlugins_TextMeshPro : BrainBase
void OnGUI()
{
if (GUILayout.Button("Rich Text Support: " + (richTextEnabled ? "ON" : "OFF"))) richTextEnabled = !richTextEnabled;
GUILayout.BeginHorizontal();
if (GUILayout.Button("Color To Green")) foreach (TextMeshPro t in texts) t.DOColor(Color.green, 1).SetEase(Ease.Linear);
if (GUILayout.Button("Color To Red")) foreach (TextMeshPro t in texts) t.DOColor(Color.red, 1).SetEase(Ease.Linear);
if (GUILayout.Button("Fade Out")) foreach (TextMeshPro t in texts) t.DOFade(0, 1).SetEase(Ease.Linear);
if (GUILayout.Button("Fade In")) foreach (TextMeshPro t in texts) t.DOFade(1, 1).SetEase(Ease.Linear);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (GUILayout.Button("Face Color To Green")) foreach (TextMeshPro t in texts) t.DOFaceColor(Color.green, 1).SetEase(Ease.Linear);
if (GUILayout.Button("Face Color To Red")) foreach (TextMeshPro t in texts) t.DOFaceColor(Color.red, 1).SetEase(Ease.Linear);
if (GUILayout.Button("Face Fade Out")) foreach (TextMeshPro t in texts) t.DOFaceFade(0, 1).SetEase(Ease.Linear);
if (GUILayout.Button("Face Fade In")) foreach (TextMeshPro t in texts) t.DOFaceFade(1, 1).SetEase(Ease.Linear);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (GUILayout.Button("Glow Color To Green")) foreach (TextMeshPro t in texts) t.DOGlowColor(Color.green, 1).SetEase(Ease.Linear);
if (GUILayout.Button("Glow Color To Red")) foreach (TextMeshPro t in texts) t.DOGlowColor(Color.red, 1).SetEase(Ease.Linear);
if (GUILayout.Button("Glow Fade Out")) foreach (TextMeshPro t in texts) t.DOGlowFade(0, 1).SetEase(Ease.Linear);
if (GUILayout.Button("Glow Fade In")) foreach (TextMeshPro t in texts) t.DOGlowFade(1, 1).SetEase(Ease.Linear);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (GUILayout.Button("Outline Color To Green")) foreach (TextMeshPro t in texts) t.DOOutlineColor(Color.green, 1).SetEase(Ease.Linear);
if (GUILayout.Button("Outline Color To Red")) foreach (TextMeshPro t in texts) t.DOOutlineColor(Color.red, 1).SetEase(Ease.Linear);
if (GUILayout.Button("Outline Fade Out")) foreach (TextMeshPro t in texts) t.DOOutlineFade(0, 1).SetEase(Ease.Linear);
if (GUILayout.Button("Outline Fade In")) foreach (TextMeshPro t in texts) t.DOOutlineFade(1, 1).SetEase(Ease.Linear);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (GUILayout.Button("Font Resize Down")) foreach (TextMeshPro t in texts) t.DOFontSize(10, 1);
if (GUILayout.Button("Font Resize Up")) foreach (TextMeshPro t in texts) t.DOFontSize(32, 1);
if (GUILayout.Button("Trim Max Visible Characters")) foreach (TextMeshPro t in texts) t.DOMaxVisibleCharacters(22, 1);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (GUILayout.Button("Text Reset")) {
DOTween.KillAll();
@ -44,6 +68,7 @@ public class ExternalPlugins_TextMeshPro : BrainBase
if (GUILayout.Button("Text Replace W Scramble")) foreach (TextMeshPro t in texts) t.DOText(replaceWText, 5, richTextEnabled, ScrambleMode.Lowercase).SetEase(Ease.Linear);
if (GUILayout.Button("Text Replace Add W Scramble")) foreach (TextMeshPro t in texts) t.DOText(" " + replaceWText, 5, richTextEnabled, ScrambleMode.Lowercase).SetRelative().SetEase(Ease.Linear);
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (GUILayout.Button("TogglePause")) DOTween.TogglePauseAll();
if (GUILayout.Button("Flip")) DOTween.FlipAll();

View File

@ -17,7 +17,7 @@ public class Basics : BrainBase
public GameObject specularSphere;
public Transform targetToDoLookAt, targetToDoLookFrom;
public GUITexture guiTexAlpha, guiTexColor;
public GUIText txtInfo, txtFloat, txtInt, txtUint, txtVector2, txtVector4, txtRect, txtRectOffset, txtString0, txtString1, txtString2;
public GUIText txtInfo, txtFloat, txtInt, txtUint, txtLong, txtUlong, txtVector2, txtVector4, txtRect, txtRectOffset, txtString0, txtString1, txtString2;
public GameObject txtBackwards;
int intId = 4;
@ -27,6 +27,8 @@ public class Basics : BrainBase
int intToTween;
uint uintToTween;
float floatToTween;
long longToTween;
ulong ulongToTween;
Vector2 vector2toTween;
Vector4 vector4toTween;
Rect rectToTween;
@ -99,6 +101,10 @@ public class Basics : BrainBase
DOTween.To(()=> intToTween, x=> intToTween = x, 100, 1.5f).SetAs(tp).Pause();
// Uint
DOTween.To(()=> uintToTween, x=> uintToTween = x, 50, 1.5f).SetAs(tp).Pause();
// Long
DOTween.To(()=> longToTween, x=> longToTween = x, 9223372036854775807L, 1.5f).SetAs(tp).Pause();
// Ulong
DOTween.To(()=> ulongToTween, x=> ulongToTween = x, 18446744073709551615UL, 1.5f).SetAs(tp).Pause();
// Vector2
DOTween.To(()=> vector2toTween, x=> vector2toTween = x, new Vector2(50,100), 1.5f).SetAs(tp).Pause();
// Vector4
@ -138,6 +144,8 @@ public class Basics : BrainBase
txtFloat.text = "float: " + floatToTween;
txtInt.text = "int: " + intToTween;
txtUint.text = "uint: " + uintToTween;
txtLong.text = "long: " + longToTween.ToString("n");
txtUlong.text = "ulong: " + ulongToTween.ToString("n");
txtVector2.text = "Vector2: " + vector2toTween;
txtVector4.text = "Vector4: " + vector4toTween;
txtRect.text = "Rect: " + rectToTween;

View File

@ -7,19 +7,10 @@ public class Temp : BrainBase
{
public Transform target;
IEnumerator Start()
void Start()
{
yield return new WaitForSeconds(0.6f);
while (true) {
if (Time.frameCount % 10 == 0) {
// Spawn empty sequences
for (int i = 0; i < 200; ++i) {
Sequence s = DOTween.Sequence();
}
yield return null;
}
yield return null;
}
target.DOMoveX(2,1)
.OnUpdate(()=> Debug.Log(DOTween.IsTweening(target)))
.OnComplete(()=> Debug.Log(DOTween.IsTweening(target)));
}
}

View File

@ -7,20 +7,56 @@ using DG.Tweening.Plugins;
using DG.Tweening.Plugins.Core;
using DG.Tweening.Plugins.Options;
using System;
public class TempTests : BrainBase
{
public Transform target;
public Ease easeType;
public float gotoTime;
public Vector3[] waypoints;
int count;
float fToTween = 14.2f;
ulong uToTween = 512UL;
long lToTween = 512L;
ulong uFull = 18446744073709551615UL;
IEnumerator Start()
{
yield return new WaitForSeconds(0.6f);
yield return new WaitForSeconds(1);
target.DOPath(waypoints, 5, PathType.CatmullRom).SetEase(easeType).SetLoops(-1);
Debug.Log(uFull.GetType() + " - " + uFull.ToString("N20"));
Debug.Log(Convert.ToUInt64(uFull).GetType() + " - " + Convert.ToUInt64(uFull).ToString("N20"));
Debug.Log((uFull * 0.9f).GetType() + " - " + (uFull * 0.9f).ToString("N20"));
Debug.Log("------------------------------");
Debug.Log(((ulong)(uFull * 0.9f)).GetType() + " - " + Convert.ToString((ulong)(uFull * 0.9f)));
Debug.Log((Convert.ToUInt64(uFull * 0.9f)).GetType() + " - " + Convert.ToString(Convert.ToUInt64(uFull * 0.9f)));
Debug.Log((uFull * 1f).ToString("N20"));
Debug.Log("------------------------------");
Debug.Log((((double)uFull * (double)0.9f)).GetType() + " - " + Convert.ToString(((double)uFull * (double)0.9f)));
Debug.Log(((ulong)((double)uFull * (double)0.9f)).GetType() + " - " + Convert.ToString((ulong)((double)uFull * (double)0.9f)));
Debug.Log("------------------------------");
byte b = (byte)(uFull * 0.9f);
Debug.Log(b);
Debug.Log((ulong)b);
Debug.Log("------------------------------");
Debug.Log("------------------------------");
Debug.Log((uFull * 0.9f).ToString("#"));
Debug.Log(Convert.ToUInt64((uFull * 0.9f).ToString("#")));
Debug.Log("------------------------------");
Debug.Log(Math.Round(uFull * 0.9f));
Debug.Log((ulong)Math.Round(uFull * 0.9f));
Debug.Log(Convert.ToUInt64(Math.Round(uFull * 0.9f)));
Debug.Log("------------------------------");
Debug.Log(((float)Math.Round(uFull * 0.9f)).ToString("N30"));
Debug.Log((ulong)((float)Math.Round(uFull * 0.9f)));
Debug.Log("::::::::::::::::::::::::::::::");
Debug.Log((ulong)(uFull * (decimal)0.9f));
DOTween.To(()=> uToTween, x=> uToTween = x, 18446744073709551615UL, 2).OnComplete(()=> Debug.Log("Complete: " + Time.realtimeSinceStartup + " - " + uToTween.ToString("N0")));
// DOTween.To(()=> lToTween, x=> lToTween = x, 8446744073709551615L, 2).OnComplete(()=> Debug.Log("Complete: " + Time.realtimeSinceStartup + " - " + lToTween.ToString("N0")));
// DOTween.To(()=>fToTween, x=> fToTween = 0, 0, 2).OnComplete(()=> Debug.Log(fToTween.ToString("N30")));
}
void OnGUI()
{
GUILayout.Label(uToTween.ToString("N0"));
}
}

View File

@ -34,7 +34,7 @@ public class UIMisc : BrainBase
.SetLoops(-1, LoopType.Yoyo);
DOTween.Sequence()
.AppendInterval(0.5f)
.Append(textScramble.DOText("", 2, true).From().SetEase(Ease.Linear))
.Append(textScramble.DOText("", 2, true, ScrambleMode.Lowercase).From().SetEase(Ease.Linear))
.AppendInterval(0.5f)
.SetLoops(-1, LoopType.Yoyo);
}

View File

@ -474,7 +474,7 @@ namespace DG.Tweening.Core
if (TogglePause(t)) totInvolved++;
break;
case OperationType.IsTweening:
totInvolved++;
if (!t.isComplete || !t.autoKill) totInvolved++;
break;
}
}

View File

@ -21,7 +21,7 @@ namespace DG.Tweening
public class DOTween
{
/// <summary>DOTween's version</summary>
public static readonly string Version = "1.0.412";
public static readonly string Version = "1.0.416";
///////////////////////////////////////////////
// Options ////////////////////////////////////
@ -280,6 +280,22 @@ namespace DG.Tweening
/// <param name="setter">A setter for the field or property to tween
/// <para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
/// <param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
public static Tweener To(DOGetter<long> getter, DOSetter<long> setter, long endValue, float duration)
{ return ApplyTo<long, long, NoOptions>(getter, setter, endValue, duration); }
/// <summary>Tweens a property or field to the given value using default plugins</summary>
/// <param name="getter">A getter for the field or property to tween.
/// <para>Example usage with lambda:</para><code>()=> myProperty</code></param>
/// <param name="setter">A setter for the field or property to tween
/// <para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
/// <param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
public static Tweener To(DOGetter<ulong> getter, DOSetter<ulong> setter, ulong endValue, float duration)
{ return ApplyTo<ulong, ulong, NoOptions>(getter, setter, endValue, duration); }
/// <summary>Tweens a property or field to the given value using default plugins</summary>
/// <param name="getter">A getter for the field or property to tween.
/// <para>Example usage with lambda:</para><code>()=> myProperty</code></param>
/// <param name="setter">A setter for the field or property to tween
/// <para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
/// <param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
public static TweenerCore<string, string, StringOptions> To(DOGetter<string> getter, DOSetter<string> setter, string endValue, float duration)
{ return ApplyTo<string, string, StringOptions>(getter, setter, endValue, duration); }
/// <summary>Tweens a property or field to the given value using default plugins</summary>

View File

@ -69,9 +69,11 @@
<Compile Include="PathType.cs" />
<Compile Include="Plugins\Color2Plugin.cs" />
<Compile Include="Plugins\Core\PathCore\ControlPoint.cs" />
<Compile Include="Plugins\LongPlugin.cs" />
<Compile Include="Plugins\Options\PathOptions.cs" />
<Compile Include="Plugins\Options\QuaternionOptions.cs" />
<Compile Include="Plugins\Options\Vector3ArrayOptions.cs" />
<Compile Include="Plugins\UlongPlugin.cs" />
<Compile Include="Plugins\Vector3ArrayPlugin.cs" />
<Compile Include="Plugins\Core\ITPlugin.cs" />
<Compile Include="Plugins\Core\SpecialPluginsUtils.cs" />

View File

@ -17,6 +17,8 @@ namespace DG.Tweening.Plugins.Core
static ITweenPlugin _floatPlugin;
static ITweenPlugin _intPlugin;
static ITweenPlugin _uintPlugin;
static ITweenPlugin _longPlugin;
static ITweenPlugin _ulongPlugin;
static ITweenPlugin _vector2Plugin;
static ITweenPlugin _vector3Plugin;
static ITweenPlugin _vector4Plugin;
@ -85,6 +87,12 @@ namespace DG.Tweening.Plugins.Core
} else if (t1 == typeof(Color2)) {
if (_color2Plugin == null) _color2Plugin = new Color2Plugin();
plugin = _color2Plugin;
} else if (t1 == typeof(long)) {
if (_longPlugin == null) _longPlugin = new LongPlugin();
plugin = _longPlugin;
} else if (t1 == typeof(ulong)) {
if (_ulongPlugin == null) _ulongPlugin = new UlongPlugin();
plugin = _ulongPlugin;
}
if (plugin != null) return plugin as ABSTweenPlugin<T1, T2, TPlugOptions>;
@ -114,6 +122,8 @@ namespace DG.Tweening.Plugins.Core
_floatPlugin = null;
_intPlugin = null;
_uintPlugin = null;
_longPlugin = null;
_ulongPlugin = null;
_vector2Plugin = null;
_vector3Plugin = null;
_vector4Plugin = null;

View File

@ -0,0 +1,58 @@
// Author: Daniele Giardini - http://www.demigiant.com
// Created: 2015/03/29 22:56
using System;
using DG.Tweening.Core;
using DG.Tweening.Core.Easing;
using DG.Tweening.Plugins.Core;
using DG.Tweening.Plugins.Options;
#pragma warning disable 1591
namespace DG.Tweening.Plugins
{
public class LongPlugin : ABSTweenPlugin<long, long, NoOptions>
{
public override void Reset(TweenerCore<long, long, NoOptions> t) { }
public override void SetFrom(TweenerCore<long, long, NoOptions> t, bool isRelative)
{
long prevEndVal = t.endValue;
t.endValue = t.getter();
t.startValue = isRelative ? t.endValue + prevEndVal : prevEndVal;
t.setter(t.startValue);
}
public override long ConvertToStartValue(TweenerCore<long, long, NoOptions> t, long value)
{
return value;
}
public override void SetRelativeEndValue(TweenerCore<long, long, NoOptions> t)
{
t.endValue += t.startValue;
}
public override void SetChangeValue(TweenerCore<long, long, NoOptions> t)
{
t.changeValue = t.endValue - t.startValue;
}
public override float GetSpeedBasedDuration(NoOptions options, float unitsXSecond, long changeValue)
{
float res = changeValue / unitsXSecond;
if (res < 0) res = -res;
return res;
}
public override void EvaluateAndApply(NoOptions options, Tween t, bool isRelative, DOGetter<long> getter, DOSetter<long> setter, float elapsed, long startValue, long changeValue, float duration, bool usingInversePosition)
{
if (t.loopType == LoopType.Incremental) startValue += changeValue * (t.isComplete ? t.completedLoops - 1 : t.completedLoops);
if (t.isSequenced && t.sequenceParent.loopType == LoopType.Incremental) {
startValue += changeValue * (t.loopType == LoopType.Incremental ? t.loops : 1)
* (t.sequenceParent.isComplete ? t.sequenceParent.completedLoops - 1 : t.sequenceParent.completedLoops);
}
setter((long)Math.Round(startValue + changeValue * EaseManager.Evaluate(t.easeType, t.customEase, elapsed, duration, t.easeOvershootOrAmplitude, t.easePeriod)));
}
}
}

View File

@ -0,0 +1,60 @@
// Author: Daniele Giardini - http://www.demigiant.com
// Created: 2015/03/29 23:01
using System;
using DG.Tweening.Core;
using DG.Tweening.Core.Easing;
using DG.Tweening.Plugins.Core;
using DG.Tweening.Plugins.Options;
using UnityEngine;
#pragma warning disable 1591
namespace DG.Tweening.Plugins
{
public class UlongPlugin : ABSTweenPlugin<ulong, ulong, NoOptions>
{
public override void Reset(TweenerCore<ulong, ulong, NoOptions> t) { }
public override void SetFrom(TweenerCore<ulong, ulong, NoOptions> t, bool isRelative)
{
ulong prevEndVal = t.endValue;
t.endValue = t.getter();
t.startValue = isRelative ? t.endValue + prevEndVal : prevEndVal;
t.setter(t.startValue);
}
public override ulong ConvertToStartValue(TweenerCore<ulong, ulong, NoOptions> t, ulong value)
{
return value;
}
public override void SetRelativeEndValue(TweenerCore<ulong, ulong, NoOptions> t)
{
t.endValue += t.startValue;
}
public override void SetChangeValue(TweenerCore<ulong, ulong, NoOptions> t)
{
t.changeValue = t.endValue - t.startValue;
}
public override float GetSpeedBasedDuration(NoOptions options, float unitsXSecond, ulong changeValue)
{
float res = changeValue / unitsXSecond;
if (res < 0) res = -res;
return res;
}
public override void EvaluateAndApply(NoOptions options, Tween t, bool isRelative, DOGetter<ulong> getter, DOSetter<ulong> setter, float elapsed, ulong startValue, ulong changeValue, float duration, bool usingInversePosition)
{
if (t.loopType == LoopType.Incremental) startValue += changeValue * (uint)(t.isComplete ? t.completedLoops - 1 : t.completedLoops);
if (t.isSequenced && t.sequenceParent.loopType == LoopType.Incremental) {
startValue += changeValue * (uint)(t.loopType == LoopType.Incremental ? t.loops : 1)
* (uint)(t.sequenceParent.isComplete ? t.sequenceParent.completedLoops - 1 : t.sequenceParent.completedLoops);
}
// Converts ease value to decimal, otherwise final ulong conversion will not be correct
setter((ulong)(startValue + changeValue * (decimal)EaseManager.Evaluate(t.easeType, t.customEase, elapsed, duration, t.easeOvershootOrAmplitude, t.easePeriod)));
}
}
}

View File

@ -1442,6 +1442,22 @@
<para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
<param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
</member>
<member name="M:DG.Tweening.DOTween.To(DG.Tweening.Core.DOGetter{System.Int64},DG.Tweening.Core.DOSetter{System.Int64},System.Int64,System.Single)">
<summary>Tweens a property or field to the given value using default plugins</summary>
<param name="getter">A getter for the field or property to tween.
<para>Example usage with lambda:</para><code>()=> myProperty</code></param>
<param name="setter">A setter for the field or property to tween
<para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
<param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
</member>
<member name="M:DG.Tweening.DOTween.To(DG.Tweening.Core.DOGetter{System.UInt64},DG.Tweening.Core.DOSetter{System.UInt64},System.UInt64,System.Single)">
<summary>Tweens a property or field to the given value using default plugins</summary>
<param name="getter">A getter for the field or property to tween.
<para>Example usage with lambda:</para><code>()=> myProperty</code></param>
<param name="setter">A setter for the field or property to tween
<para>Example usage with lambda:</para><code>x=> myProperty = x</code></param>
<param name="endValue">The end value to reach</param><param name="duration">The tween's duration</param>
</member>
<member name="M:DG.Tweening.DOTween.To(DG.Tweening.Core.DOGetter{System.String},DG.Tweening.Core.DOSetter{System.String},System.String,System.Single)">
<summary>Tweens a property or field to the given value using default plugins</summary>
<param name="getter">A getter for the field or property to tween.

Binary file not shown.

Binary file not shown.

Binary file not shown.