1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-20 17:26:03 +08:00

DOTweenInspector > Added Play/Pause/Kill All buttons

This commit is contained in:
Demigiant 2016-03-06 13:39:11 +01:00
parent 72f42baa67
commit 9fb0daae6d
61 changed files with 73 additions and 45 deletions

2
.gitignore vendored
View File

@ -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*

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 21910083fa7ddb9418b1f325411856be
timeCreated: 1433157219
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: c9c1c8b84aaadd843ab6ebf98bdd8b71
timeCreated: 1433157312
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 908059918c3382a4fa594291928bae25
timeCreated: 1433154602
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -4,20 +4,15 @@ using DG.Tweening;
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);
}
}

View File

@ -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)));
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 24fdd105e064e4540933dbd78c6411d8
timeCreated: 1456396885
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: ff9f3d81e30130643bf3e3b67c0674b5
timeCreated: 1442748793
licenseType: Free
guid: 615ce20fe7ca95a40a13d90fe24063f0
timeCreated: 1456396874
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:

View File

@ -11,15 +11,30 @@ using UnityEngine.UI;
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;
}
}

View File

@ -1,2 +1,2 @@
m_EditorVersion: 5.3.1f1
m_EditorVersion: 5.3.2f1
m_StandardAssetsVersion: 0

View File

@ -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 ////////////////////////////////////

View File

@ -60,6 +60,11 @@ namespace DG.DOTweenEditor
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;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.