mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2025-12-20 09:16:02 +08:00
[minor]
This commit is contained in:
parent
c7d916ef53
commit
85b2efd056
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.
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.
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.
@ -5,15 +5,15 @@ using DG.Tweening;
|
|||||||
|
|
||||||
public class TempPro : MonoBehaviour
|
public class TempPro : MonoBehaviour
|
||||||
{
|
{
|
||||||
public DOTweenPath path;
|
public Transform target;
|
||||||
|
|
||||||
void Start ()
|
void Start ()
|
||||||
{
|
{
|
||||||
path.GetTween().OnWaypointChange(OnWaypointChange);
|
target.DOMoveX(3, 1).OnComplete(TempPro.OnCompleteCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnWaypointChange (int index)
|
public static void OnCompleteCallback()
|
||||||
{
|
{
|
||||||
Debug.Log(index);
|
Debug.Log("Hello I'm public! And Static! Love me!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
@ -11,37 +11,8 @@ using UnityEngine.UI;
|
|||||||
|
|
||||||
public class TempTests : BrainBase
|
public class TempTests : BrainBase
|
||||||
{
|
{
|
||||||
public int poolId;
|
public void OnComplete()
|
||||||
public Transform target;
|
|
||||||
private Transform myTransform;
|
|
||||||
private Color baseColor;
|
|
||||||
void Awake () {
|
|
||||||
myTransform = transform;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Show (string txt) {
|
|
||||||
myTransform.SetAsLastSibling ();
|
|
||||||
this.StartCoroutine(RemoveIn());
|
|
||||||
}
|
|
||||||
|
|
||||||
IEnumerator RemoveIn () {
|
|
||||||
yield return new WaitForSeconds(4);
|
|
||||||
Hide ();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Hide ()
|
|
||||||
{
|
{
|
||||||
target.DOMoveX(2, 1).OnComplete (Remove);
|
Debug.Log("ON COMPLETE");
|
||||||
}
|
|
||||||
|
|
||||||
private void Remove ()
|
|
||||||
{
|
|
||||||
target.gameObject.SetActive(false);
|
|
||||||
// Destroy(target.gameObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnDisable ()
|
|
||||||
{
|
|
||||||
target.DOKill();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
@ -125,7 +125,7 @@ namespace DG.Tweening.Core
|
|||||||
}
|
}
|
||||||
|
|
||||||
// _tweenPlugin is not reset since it's useful to keep it as a reference
|
// _tweenPlugin is not reset since it's useful to keep it as a reference
|
||||||
internal override sealed void Reset()
|
internal sealed override void Reset()
|
||||||
{
|
{
|
||||||
base.Reset();
|
base.Reset();
|
||||||
|
|
||||||
|
|||||||
@ -253,6 +253,7 @@ namespace DG.Tweening
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks all active tweens to find and remove eventually invalid ones (usually because their targets became NULL)
|
/// Checks all active tweens to find and remove eventually invalid ones (usually because their targets became NULL)
|
||||||
/// and returns the total number of invalid tweens found and removed.
|
/// and returns the total number of invalid tweens found and removed.
|
||||||
|
/// IMPORTANT: this will cause an error on UWP platform, so don't use it there
|
||||||
/// BEWARE: this is a slightly expensive operation so use it with care
|
/// BEWARE: this is a slightly expensive operation so use it with care
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int Validate()
|
public static int Validate()
|
||||||
|
|||||||
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.
Loading…
x
Reference in New Issue
Block a user