Skip to content

Commit

Permalink
Fixed OnWaypointChange sometimes not working correctly between the la…
Browse files Browse the repository at this point in the history
…st waypoint and the previous one
  • Loading branch information
Demigiant committed Oct 12, 2016
1 parent 64763e1 commit c7d916e
Show file tree
Hide file tree
Showing 55 changed files with 223 additions and 21 deletions.
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 modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DemiLib/Core/DemiLib.dll
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DemiLib/Core/DemiLib.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
191 changes: 183 additions & 8 deletions UnityTests.Unity5/Assets/Demigiant/DemiLib/Core/Editor/DemiEditor.xml

Large diffs are not rendered by default.

Binary file modified UnityTests.Unity5/Assets/Resources/DOTweenSettings.asset
Binary file not shown.
11 changes: 6 additions & 5 deletions UnityTests.Unity5/Assets/_Tests PRO/TempPro.cs
Expand Up @@ -7,12 +7,13 @@ public class TempPro : MonoBehaviour
{
public DOTweenPath path;

IEnumerator Start()
void Start ()
{
yield return new WaitForSeconds(0.5f);
path.GetTween().OnWaypointChange(OnWaypointChange);
}

Debug.Log("PLAY");
Debug.Log(path.GetTween().id);
DOTween.Play("myId");
void OnWaypointChange (int index)
{
Debug.Log(index);
}
}
Binary file modified UnityTests.Unity5/Assets/_Tests PRO/TempPro.unity
Binary file not shown.
37 changes: 31 additions & 6 deletions UnityTests.Unity5/Assets/_Tests/TempTests.cs
Expand Up @@ -5,18 +5,43 @@
using DG.Tweening;
using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;

public class TempTests : BrainBase
{
public float randomness = 90;
public bool fadeOut;
public Transform target;
public int poolId;
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);
}

private void Remove ()
{
target.gameObject.SetActive(false);
// Destroy(target.gameObject);
}

public void Shake()
void OnDisable ()
{
DOTween.KillAll(true);
target.DOShakePosition(2, 2, 10, randomness, false, fadeOut);
target.DOKill();
}
}
Binary file modified UnityTests.Unity5/Assets/_Tests/TempTests.unity
Binary file not shown.
Binary file modified UnityTests.Unity5/ProjectSettings/GraphicsSettings.asset
Binary file not shown.
Binary file modified UnityTests.Unity5/ProjectSettings/ProjectSettings.asset
Binary file not shown.
2 changes: 1 addition & 1 deletion UnityTests.Unity5/ProjectSettings/ProjectVersion.txt
@@ -1,2 +1,2 @@
m_EditorVersion: 5.3.2f1
m_EditorVersion: 5.4.0f3
m_StandardAssetsVersion: 0
2 changes: 1 addition & 1 deletion _DOTween.Assembly/DOTween/DOTween.cs
Expand Up @@ -32,7 +32,7 @@ namespace DG.Tweening
public class DOTween
{
/// <summary>DOTween's version</summary>
public static readonly string Version = "1.1.315";
public static readonly string Version = "1.1.330";

///////////////////////////////////////////////
// Options ////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions _DOTween.Assembly/DOTween/Plugins/Core/PathCore/Path.cs
Expand Up @@ -138,6 +138,7 @@ internal int GetWaypointIndexFromPerc(float perc, bool isMovingForward)
float currLen = 0;
for (int i = 0, count = wpLengths.Length; i < count; i++) {
currLen += wpLengths[i];
if (i == count - 1) return isMovingForward ? i - 1 : i;
if (currLen < totPercLen) continue;
if (currLen > totPercLen) return isMovingForward ? i - 1 : i;
return i;
Expand Down
Binary file modified _DOTween.Assembly/bin/DOTween.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween.dll.mdb
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween43.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween43.dll.mdb
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween46.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween46.dll.mdb
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween50.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween50.dll.mdb
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/Editor/DOTweenEditor.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb
Binary file not shown.

0 comments on commit c7d916e

Please sign in to comment.