mirror of
https://github.com/Cardidi/dotween-upm-fork.git
synced 2026-02-12 01:58:47 +08:00
More GUI Editor utils
This commit is contained in:
parent
0e4f16f7a4
commit
e194bad34e
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.
9
UnityTests.Unity5/Assets/Demigiant/DOTween/Gizmos.meta
Normal file
9
UnityTests.Unity5/Assets/Demigiant/DOTween/Gizmos.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37ee0778ced0de945b4521e7e0ee9dac
|
||||
folderAsset: yes
|
||||
timeCreated: 1428482901
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -7,10 +7,15 @@ public class Temp : BrainBase
|
||||
{
|
||||
public Transform target;
|
||||
|
||||
void Start()
|
||||
public void TweenThis(int direction)
|
||||
{
|
||||
target.DOMoveX(2,1)
|
||||
.OnUpdate(()=> Debug.Log(DOTween.IsTweening(target)))
|
||||
.OnComplete(()=> Debug.Log(DOTween.IsTweening(target)));
|
||||
Debug.Log("HERE");
|
||||
if (DOTween.IsTweening("infoTabSwipeAnim")) {
|
||||
Debug.Log("IsTweening");
|
||||
// DOTween.Rewind("infoTabSwipeAnim", false);
|
||||
DOTween.Kill("infoTabSwipeAnim", true);
|
||||
}
|
||||
|
||||
target.DOLocalMoveX(direction*800, 0.3f, false).From().SetEase(Ease.OutBack).SetId("infoTabSwipeAnim");
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@ -5,17 +5,17 @@ public class PooledAnimation : MonoBehaviour
|
||||
{
|
||||
public void OnSpawn()
|
||||
{
|
||||
DOTweenAnimation doanim = this.GetComponent<DOTweenAnimation>();
|
||||
if (doanim) doanim.DORestart(true);
|
||||
DOTweenPath dopath = this.GetComponent<DOTweenPath>();
|
||||
if (dopath) dopath.DORestart(true);
|
||||
// DOTweenAnimation doanim = this.GetComponent<DOTweenAnimation>();
|
||||
// if (doanim) doanim.DORestart(true);
|
||||
// DOTweenPath dopath = this.GetComponent<DOTweenPath>();
|
||||
// if (dopath) dopath.DORestart(true);
|
||||
}
|
||||
|
||||
public void OnDespawn()
|
||||
{
|
||||
DOTweenAnimation doanim = this.GetComponent<DOTweenAnimation>();
|
||||
if (doanim) doanim.DORewind();
|
||||
DOTweenPath dopath = this.GetComponent<DOTweenPath>();
|
||||
if (dopath) dopath.DORewind();
|
||||
// DOTweenAnimation doanim = this.GetComponent<DOTweenAnimation>();
|
||||
// if (doanim) doanim.DORewind();
|
||||
// DOTweenPath dopath = this.GetComponent<DOTweenPath>();
|
||||
// if (dopath) dopath.DORewind();
|
||||
}
|
||||
}
|
||||
@ -5,17 +5,17 @@ public class PooledChildAnimation : MonoBehaviour
|
||||
{
|
||||
public void OnSpawn()
|
||||
{
|
||||
DOTweenAnimation doanim = this.GetComponentInChildren<DOTweenAnimation>();
|
||||
if (doanim) doanim.DORestart(true);
|
||||
DOTweenPath dopath = this.GetComponentInChildren<DOTweenPath>();
|
||||
if (dopath) dopath.DORestart(true);
|
||||
// DOTweenAnimation doanim = this.GetComponentInChildren<DOTweenAnimation>();
|
||||
// if (doanim) doanim.DORestart(true);
|
||||
// DOTweenPath dopath = this.GetComponentInChildren<DOTweenPath>();
|
||||
// if (dopath) dopath.DORestart(true);
|
||||
}
|
||||
|
||||
public void OnDespawn()
|
||||
{
|
||||
DOTweenAnimation doanim = this.GetComponentInChildren<DOTweenAnimation>();
|
||||
if (doanim) doanim.DORewind();
|
||||
DOTweenPath dopath = this.GetComponentInChildren<DOTweenPath>();
|
||||
if (dopath) dopath.DORewind();
|
||||
// DOTweenAnimation doanim = this.GetComponentInChildren<DOTweenAnimation>();
|
||||
// if (doanim) doanim.DORewind();
|
||||
// DOTweenPath dopath = this.GetComponentInChildren<DOTweenPath>();
|
||||
// if (dopath) dopath.DORewind();
|
||||
}
|
||||
}
|
||||
@ -21,7 +21,7 @@ namespace DG.Tweening
|
||||
public class DOTween
|
||||
{
|
||||
/// <summary>DOTween's version</summary>
|
||||
public static readonly string Version = "1.0.445";
|
||||
public static readonly string Version = "1.0.450";
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// Options ////////////////////////////////////
|
||||
|
||||
@ -29,6 +29,19 @@ namespace DG.DOTweenEditor.Core
|
||||
popupButton,
|
||||
btIconStyle;
|
||||
|
||||
public static Texture2D logo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_logo == null) {
|
||||
_logo = Resources.LoadAssetAtPath("Assets/" + EditorUtils.editorADBDir + "Imgs/DOTweenIcon.png", typeof(Texture2D)) as Texture2D;
|
||||
EditorUtils.SetEditorTexture(_logo, FilterMode.Bilinear, 128);
|
||||
}
|
||||
return _logo;
|
||||
}
|
||||
}
|
||||
static Texture2D _logo;
|
||||
|
||||
// Filtered ease types to show desired eases in Inspector panels
|
||||
internal static readonly string[] FilteredEaseTypes = new[] {
|
||||
"Linear",
|
||||
@ -79,6 +92,11 @@ namespace DG.DOTweenEditor.Core
|
||||
return stringEaseId == FilteredEaseTypes.Length - 1 ? Ease.INTERNAL_Custom : (Ease)Enum.Parse(typeof(Ease), FilteredEaseTypes[stringEaseId]);
|
||||
}
|
||||
|
||||
public static void InspectorLogo()
|
||||
{
|
||||
GUILayout.Box(logo, logoIconStyle);
|
||||
}
|
||||
|
||||
// A button which works as a toggle
|
||||
public static bool ToggleButton(bool toggled, GUIContent content, GUIStyle guiStyle = null, params GUILayoutOption[] options)
|
||||
{
|
||||
|
||||
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