Skip to content

Commit

Permalink
DOTweenInspector > Added Play/Pause/Kill All buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Demigiant committed Mar 6, 2016
1 parent 72f42ba commit 9fb0daa
Show file tree
Hide file tree
Showing 61 changed files with 73 additions and 45 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ ExternalPluginsTestsAndExamples*
*.Unity*/Assets/Console*Pro*
*.Unity*/Assets/Text*Mesh*Pro*
*.Unity*/Assets/CodeStage
*.Unity*/Assets/_DOTween Pro Examples
*.Unity*/Assets/_Tests PRO
.vs
*HOPoolOperator*
*HOTools*
Expand Down
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 not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

15 changes: 5 additions & 10 deletions UnityTests.Unity5/Assets/_Tests PRO/TempPro.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,15 @@

public class TempPro : MonoBehaviour
{
public DOTweenAnimation anime;
public Rigidbody2D target;

void Update()
void Start()
{
if (Input.GetKeyDown(KeyCode.Space)) anime.DORestart(true);
target.transform.DOScale(2, 1).SetLoops(-1);
}

public void OnCreated()
void FixedUpdate()
{
Debug.Log("Tween created > " + anime.tween);
}

public void Output()
{
Debug.Log("HERE");
target.position += new Vector2(0.03f, 0);
}
}
Binary file modified UnityTests.Unity5/Assets/_Tests PRO/TempPro.unity
Binary file not shown.
23 changes: 23 additions & 0 deletions UnityTests.Unity5/Assets/_Tests/Bugs/CaptureFrameRate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using UnityEngine;
using System.Collections;
using DG.Tweening;

public class CaptureFrameRate : BrainBase
{
public bool captureFrameRate = true;
public bool callInit = false;
public Transform target;

void Start()
{
if (captureFrameRate) Time.captureFramerate = 10; // TOO FAST ANIMATION (1 second)
// if (captureFrameRate) Application.targetFrameRate = 10; // WORKS

if (callInit) DOTween.Init(); // Fixes fast animation (why?)

DOTween.defaultTimeScaleIndependent = true;

float time = Time.realtimeSinceStartup;
target.DOLocalMoveY(-450,5).OnComplete(()=> Debug.Log("> " + (Time.realtimeSinceStartup - time)));
}
}
12 changes: 12 additions & 0 deletions UnityTests.Unity5/Assets/_Tests/Bugs/CaptureFrameRate.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 21 additions & 6 deletions UnityTests.Unity5/Assets/_Tests/TempTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,30 @@
public class TempTests : BrainBase
{
public Transform target;
public float InitialDelay = 1;
public float ExpandDelay = 2;
public float ExpandSpeed = 0.1f;
public float RetractDelay = 2;
public float RetractSpeed = 2;

IEnumerator Start()
float time;

Sequence s;
// Use this for initialization
void Start ()
{
Tween t = target.DOMoveX(2, 1).OnPlay(()=>Debug.Log("PLAY")).SetAutoKill(false);
t.SetDelay(1);
time = Time.realtimeSinceStartup;

yield return new WaitForSeconds(2.5f);
s = DOTween.Sequence();
s.Append(target.DOMove(target.position + new Vector3(0, 0.1f, 0),0.1f).SetDelay(InitialDelay));
s.Append(target.DOMove(target.position + new Vector3(0, 1, 0), ExpandSpeed).SetDelay(ExpandDelay));
s.Append(target.DOMove(target.position - new Vector3(0, 1.1f, 0), RetractSpeed).SetDelay(RetractDelay));
s.SetLoops(-1, LoopType.Restart).OnStepComplete(Step);
}

t.Rewind();
t.Play();
void Step()
{
Debug.Log(Time.realtimeSinceStartup - time);
time = Time.realtimeSinceStartup;
}
}
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
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m_EditorVersion: 5.3.1f1
m_EditorVersion: 5.3.2f1
m_StandardAssetsVersion: 0
2 changes: 1 addition & 1 deletion _DOTween.Assembly/DOTween/DOTween.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace DG.Tweening
public class DOTween
{
/// <summary>DOTween's version</summary>
public static readonly string Version = "1.1.165";
public static readonly string Version = "1.1.180";

///////////////////////////////////////////////
// Options ////////////////////////////////////
Expand Down
5 changes: 5 additions & 0 deletions _DOTween.Assembly/DOTweenEditor/DOTweenInspector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ override public void OnInspectorGUI()
if (GUILayout.Button(_showPlayingTweensData ? "Hide Playing Tweens" : "Show Playing Tweens")) _showPlayingTweensData = !_showPlayingTweensData;
if (GUILayout.Button(_showPausedTweensData ? "Hide Paused Tweens" : "Show Paused Tweens")) _showPausedTweensData = !_showPausedTweensData;
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal();
if (GUILayout.Button("Play all")) DOTween.PlayAll();
if (GUILayout.Button("Pause all")) DOTween.PauseAll();
if (GUILayout.Button("Kill all")) DOTween.KillAll();
GUILayout.EndHorizontal();

GUILayout.Space(8);
_strBuilder.Length = 0;
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 9fb0daa

Please sign in to comment.