mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-20 09:16:02 +08:00
Added RectTransform.DOAnchorMin/Max shortcuts
This commit is contained in:
parent
299ad82622
commit
0d75335df2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -114,6 +114,18 @@
|
||||
<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.DOAnchorMax(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||
<summary>Tweens a RectTransform's anchorMax 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.DOAnchorMin(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||
<summary>Tweens a RectTransform's anchorMin 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.DOSizeDelta(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||
<summary>Tweens a RectTransform's sizeDelta to the given value.
|
||||
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -114,6 +114,18 @@
|
||||
<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.DOAnchorMax(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||
<summary>Tweens a RectTransform's anchorMax 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.DOAnchorMin(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||
<summary>Tweens a RectTransform's anchorMin 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.DOSizeDelta(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||
<summary>Tweens a RectTransform's sizeDelta to the given value.
|
||||
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -114,6 +114,18 @@
|
||||
<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.DOAnchorMax(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||
<summary>Tweens a RectTransform's anchorMax 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.DOAnchorMin(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||
<summary>Tweens a RectTransform's anchorMin 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.DOSizeDelta(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||
<summary>Tweens a RectTransform's sizeDelta to the given value.
|
||||
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,15 +1,20 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using DG.Tweening;
|
||||
|
||||
public class MaterialLerp : MonoBehaviour {
|
||||
public class MaterialLerp : BrainBase
|
||||
{
|
||||
public Renderer target;
|
||||
public Material switchMaterial;
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
IEnumerator Start()
|
||||
{
|
||||
yield return new WaitForSeconds(0.7f);
|
||||
|
||||
float n = 0;
|
||||
DOTween.To(()=> n, x=> n = x, 1, 2).SetEase(Ease.Linear)
|
||||
.OnUpdate(()=> {
|
||||
target.material.Lerp(target.material, switchMaterial, n);
|
||||
});
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0136b8828ea3a24c852266863d1ee26
|
||||
timeCreated: 1454675799
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e809148e1163c7b4cbcaccb2d0f9e34d
|
||||
timeCreated: 1454675807
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -32,7 +32,7 @@ namespace DG.Tweening
|
||||
public class DOTween
|
||||
{
|
||||
/// <summary>DOTween's version</summary>
|
||||
public static readonly string Version = "1.1.150";
|
||||
public static readonly string Version = "1.1.155";
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// Options ////////////////////////////////////
|
||||
|
||||
@ -236,6 +236,26 @@ namespace DG.Tweening
|
||||
.SetOptions(snapping).SetTarget(target);
|
||||
}
|
||||
|
||||
/// <summary>Tweens a RectTransform's anchorMax 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 DOAnchorMax(this RectTransform target, Vector2 endValue, float duration, bool snapping = false)
|
||||
{
|
||||
return DOTween.To(() => target.anchorMax, x => target.anchorMax = x, endValue, duration)
|
||||
.SetOptions(snapping).SetTarget(target);
|
||||
}
|
||||
|
||||
/// <summary>Tweens a RectTransform's anchorMin 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 DOAnchorMin(this RectTransform target, Vector2 endValue, float duration, bool snapping = false)
|
||||
{
|
||||
return DOTween.To(() => target.anchorMin, x => target.anchorMin = x, endValue, duration)
|
||||
.SetOptions(snapping).SetTarget(target);
|
||||
}
|
||||
|
||||
/// <summary>Tweens a RectTransform's sizeDelta 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>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -114,6 +114,18 @@
|
||||
<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.DOAnchorMax(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||
<summary>Tweens a RectTransform's anchorMax 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.DOAnchorMin(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||
<summary>Tweens a RectTransform's anchorMin 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.DOSizeDelta(UnityEngine.RectTransform,UnityEngine.Vector2,System.Single,System.Boolean)">
|
||||
<summary>Tweens a RectTransform's sizeDelta to the given value.
|
||||
Also stores the RectTransform as the tween's target so it can be used for filtered operations</summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user