mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2026-02-14 19:11:39 +08:00
Added tween.Loops() method
This commit is contained in:
parent
a1eedfa14e
commit
5c9a7e4fd3
@ -790,6 +790,10 @@
|
||||
<member name="M:DG.Tweening.TweenExtensions.IsPlaying(DG.Tweening.Tween)">
|
||||
<summary>Returns TRUE if this tween is playing</summary>
|
||||
</member>
|
||||
<member name="M:DG.Tweening.TweenExtensions.Loops(DG.Tweening.Tween)">
|
||||
<summary>Returns the total number of loops set for this tween
|
||||
(returns -1 if the loops are infinite)</summary>
|
||||
</member>
|
||||
<member name="M:DG.Tweening.TweenExtensions.PathGetPoint(DG.Tweening.Tween,System.Single)">
|
||||
<summary>
|
||||
Returns a point on a path based on the given path percentage.
|
||||
|
||||
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.
@ -94,7 +94,7 @@
|
||||
</member>
|
||||
<member name="M:DG.Tweening.ShortcutExtensions50.DOSmoothRewind(UnityEngine.Audio.AudioMixer)">
|
||||
<summary>
|
||||
Smoothly eewinds all tweens that have this target as a reference
|
||||
Smoothly rewinds all tweens that have this target as a reference
|
||||
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||
and returns the total number of tweens rewinded.
|
||||
</summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -790,6 +790,10 @@
|
||||
<member name="M:DG.Tweening.TweenExtensions.IsPlaying(DG.Tweening.Tween)">
|
||||
<summary>Returns TRUE if this tween is playing</summary>
|
||||
</member>
|
||||
<member name="M:DG.Tweening.TweenExtensions.Loops(DG.Tweening.Tween)">
|
||||
<summary>Returns the total number of loops set for this tween
|
||||
(returns -1 if the loops are infinite)</summary>
|
||||
</member>
|
||||
<member name="M:DG.Tweening.TweenExtensions.PathGetPoint(DG.Tweening.Tween,System.Single)">
|
||||
<summary>
|
||||
Returns a point on a path based on the given path percentage.
|
||||
|
||||
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.
@ -94,7 +94,7 @@
|
||||
</member>
|
||||
<member name="M:DG.Tweening.ShortcutExtensions50.DOSmoothRewind(UnityEngine.Audio.AudioMixer)">
|
||||
<summary>
|
||||
Smoothly eewinds all tweens that have this target as a reference
|
||||
Smoothly rewinds all tweens that have this target as a reference
|
||||
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||
and returns the total number of tweens rewinded.
|
||||
</summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -790,6 +790,10 @@
|
||||
<member name="M:DG.Tweening.TweenExtensions.IsPlaying(DG.Tweening.Tween)">
|
||||
<summary>Returns TRUE if this tween is playing</summary>
|
||||
</member>
|
||||
<member name="M:DG.Tweening.TweenExtensions.Loops(DG.Tweening.Tween)">
|
||||
<summary>Returns the total number of loops set for this tween
|
||||
(returns -1 if the loops are infinite)</summary>
|
||||
</member>
|
||||
<member name="M:DG.Tweening.TweenExtensions.PathGetPoint(DG.Tweening.Tween,System.Single)">
|
||||
<summary>
|
||||
Returns a point on a path based on the given path percentage.
|
||||
|
||||
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.
@ -94,7 +94,7 @@
|
||||
</member>
|
||||
<member name="M:DG.Tweening.ShortcutExtensions50.DOSmoothRewind(UnityEngine.Audio.AudioMixer)">
|
||||
<summary>
|
||||
Smoothly eewinds all tweens that have this target as a reference
|
||||
Smoothly rewinds all tweens that have this target as a reference
|
||||
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||
and returns the total number of tweens rewinded.
|
||||
</summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
25
UnityTests.Unity5/Assets/_DOTween Examples/PressPlatform.cs
Normal file
25
UnityTests.Unity5/Assets/_DOTween Examples/PressPlatform.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using DG.Tweening;
|
||||
|
||||
public class PressPlatform : MonoBehaviour
|
||||
{
|
||||
public float speed = 2;
|
||||
|
||||
Tweener tween;
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Create the tween
|
||||
tween = transform.DOLocalMoveY(-4, speed).SetAutoKill(false).Pause();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.DownArrow)) {
|
||||
tween.PlayForward();
|
||||
} else if (Input.GetKeyUp(KeyCode.DownArrow)) {
|
||||
tween.PlayBackwards();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d358361257181d4a9f560c14c0e58ca
|
||||
timeCreated: 1433544002
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
UnityTests.Unity5/Assets/_DOTween Examples/PressPlatform.unity
Normal file
BIN
UnityTests.Unity5/Assets/_DOTween Examples/PressPlatform.unity
Normal file
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0394305039ec6eb48b4883a3274922cb
|
||||
timeCreated: 1433543602
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
BIN
UnityTests.Unity5/Assets/_Tests PRO/TempPro_B.unity
Normal file
BIN
UnityTests.Unity5/Assets/_Tests PRO/TempPro_B.unity
Normal file
Binary file not shown.
8
UnityTests.Unity5/Assets/_Tests PRO/TempPro_B.unity.meta
Normal file
8
UnityTests.Unity5/Assets/_Tests PRO/TempPro_B.unity.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6274db3b7de32fd48850882fdcc7b4ab
|
||||
timeCreated: 1433414690
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class RectTransformConversionTests : BrainBase
|
||||
{
|
||||
public RectTransform a, b;
|
||||
public RectTransform target;
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Corners
|
||||
Vector3[] aCorners = new Vector3[4];
|
||||
Vector3[] targetCorners = new Vector3[4];
|
||||
a.GetWorldCorners(aCorners);
|
||||
target.GetWorldCorners(targetCorners);
|
||||
Debug.Log("A ::::::::::::::::::::::::::::::::::::::");
|
||||
Debug.Log("Corners: " + ArrayToString(aCorners));
|
||||
Debug.Log("B ::::::::::::::::::::::::::::::::::::::");
|
||||
Debug.Log("TARGET :::::::::::::::::::::::::::::::::");
|
||||
Debug.Log("Corners: " + ArrayToString(targetCorners));
|
||||
}
|
||||
|
||||
string ArrayToString(IList list)
|
||||
{
|
||||
StringBuilder s = new StringBuilder();
|
||||
for (int i = 0; i < list.Count; ++i) {
|
||||
if (i > 0) s.Append(", ");
|
||||
s.Append(list[i].ToString());
|
||||
}
|
||||
return s.ToString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f9a8d2e22a0f3f4d84e1d1f32d005a7
|
||||
timeCreated: 1433409273
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 67d34f8f14b3dfa409be463f5b66239d
|
||||
timeCreated: 1433409263
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -32,7 +32,7 @@ namespace DG.Tweening
|
||||
public class DOTween
|
||||
{
|
||||
/// <summary>DOTween's version</summary>
|
||||
public static readonly string Version = "1.0.775";
|
||||
public static readonly string Version = "1.0.780";
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// Options ////////////////////////////////////
|
||||
|
||||
@ -508,6 +508,18 @@ namespace DG.Tweening
|
||||
return t.isPlaying;
|
||||
}
|
||||
|
||||
/// <summary>Returns the total number of loops set for this tween
|
||||
/// (returns -1 if the loops are infinite)</summary>
|
||||
public static int Loops(this Tween t)
|
||||
{
|
||||
if (!t.active) {
|
||||
if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return t.loops;
|
||||
}
|
||||
|
||||
#region Path Tweens
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -790,6 +790,10 @@
|
||||
<member name="M:DG.Tweening.TweenExtensions.IsPlaying(DG.Tweening.Tween)">
|
||||
<summary>Returns TRUE if this tween is playing</summary>
|
||||
</member>
|
||||
<member name="M:DG.Tweening.TweenExtensions.Loops(DG.Tweening.Tween)">
|
||||
<summary>Returns the total number of loops set for this tween
|
||||
(returns -1 if the loops are infinite)</summary>
|
||||
</member>
|
||||
<member name="M:DG.Tweening.TweenExtensions.PathGetPoint(DG.Tweening.Tween,System.Single)">
|
||||
<summary>
|
||||
Returns a point on a path based on the given path percentage.
|
||||
|
||||
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.
@ -94,7 +94,7 @@
|
||||
</member>
|
||||
<member name="M:DG.Tweening.ShortcutExtensions50.DOSmoothRewind(UnityEngine.Audio.AudioMixer)">
|
||||
<summary>
|
||||
Smoothly eewinds all tweens that have this target as a reference
|
||||
Smoothly rewinds all tweens that have this target as a reference
|
||||
(meaning tweens that were started from this target, or that had this target added as an Id)
|
||||
and returns the total number of tweens rewinded.
|
||||
</summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user